X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fnew.c;h=9774729ae5af15086712aadfb0a5389a1f6a6517;hp=cb16dea29d4475af23dd2158309fc4eea0a68dde;hb=10eff860a28b96582526eb739fd0a55441669938;hpb=d6742b1bb19c7eca8488402484a6e4f55543d789 diff --git a/uip/new.c b/uip/new.c index cb16dea..9774729 100644 --- a/uip/new.c +++ b/uip/new.c @@ -187,9 +187,9 @@ check_folder(char *folder, size_t len, struct list_state *b) if (is_cur || msgnums != NULL) { if (*b->first == NULL) { - *b->first = b->node = mh_xmalloc(sizeof(*b->node)); + *b->first = b->node = mh_xcalloc(1, sizeof(*b->node)); } else { - b->node->n_next = mh_xmalloc(sizeof(*b->node)); + b->node->n_next = mh_xcalloc(1, sizeof(*b->node)); b->node = b->node->n_next; } b->node->n_name = folder; @@ -280,7 +280,7 @@ join_sequences(char *sequences[]) for (i = 0; sequences[i] != NULL; i++) { len += strlen(sequences[i]) + 1; } - result = mh_xmalloc(len + 1); + result = mh_xcalloc(len + 1, sizeof(char)); for (i = 0, cp = result; sequences[i] != NULL; i++, cp += len + 1) { len = strlen(sequences[i]);