diff options
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | set-contact-blocks.c | 2 | ||||
-rw-r--r-- | unblock-contact.c | 1 |
3 files changed, 2 insertions, 4 deletions
@@ -1,6 +1,3 @@ -Test set-contact-blocks -Test get-contact-blocks -Test unblock-contact Add ability to filter on unset values in entries Add ability to remove values in entries Add man pages diff --git a/set-contact-blocks.c b/set-contact-blocks.c index 9e1ada5..ddab383 100644 --- a/set-contact-blocks.c +++ b/set-contact-blocks.c @@ -197,7 +197,7 @@ main(int argc, char *argv[]) for (; contact.blocks[i]; i++); contact.blocks = erealloc(contact.blocks, (i + 2) * sizeof(*contact.blocks)); contact.blocks[i + 1] = NULL; - contact.blocks[i] = ecalloc(1, sizeof(**contact.emails)); + contact.blocks[i] = ecalloc(1, sizeof(**contact.blocks)); contact.blocks[i]->service = estrdup(srv ? srv : ".global"); contact.blocks[i]->explicit = explicit; contact.blocks[i]->shadow_block = shadow_block; diff --git a/unblock-contact.c b/unblock-contact.c index ad2b5a0..e16a97c 100644 --- a/unblock-contact.c +++ b/unblock-contact.c @@ -114,6 +114,7 @@ main(int argc, char *argv[]) libcontacts_block_destroy(*w); free(*w--); } + *w = NULL; if (libcontacts_save_contact(&contact, user)) eprintf("libcontacts_save_contact %s:", *argv); } |