X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhbuild.c;h=140cfdb39dc669f5704e28559ef7cd8d9138570d;hp=de2cf4596ac2b5bd499f9c38e38d505afa6b5d15;hb=e16d5bfc58d8b0dfe61701cd4d6b1732e837d60a;hpb=72795bfcbe9f7fee8927b1a4942c0230b0f857a8 diff --git a/uip/mhbuild.c b/uip/mhbuild.c index de2cf45..140cfdb 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -329,7 +329,7 @@ build_mime(char *infile) /* ** Allocate space for primary (outside) content */ - if ((ct = (CT) calloc(1, sizeof(*ct))) == NULL) + if ((ct = (CT) mh_xcalloc(1, sizeof(*ct))) == NULL) adios(EX_OSERR, NULL, "out of memory"); /* @@ -430,7 +430,7 @@ finish_field: ct->c_subtype = MULTI_MIXED; ct->c_file = getcpy(infile); - if ((m = (struct multipart *) calloc(1, sizeof(*m))) == NULL) + if ((m = (struct multipart *) mh_xcalloc(1, sizeof(*m))) == NULL) adios(EX_OSERR, NULL, "out of memory"); ct->c_ctparams = (void *) m; pp = &m->mp_parts; @@ -450,7 +450,7 @@ finish_field: if (!p) continue; - if ((part = (struct part *) calloc(1, sizeof(*part))) == NULL) + if ((part = (struct part *) mh_xcalloc(1, sizeof(*part))) == NULL) adios(EX_OSERR, NULL, "out of memory"); *pp = part; pp = &part->mp_next; @@ -531,7 +531,7 @@ init_decoded_content(CT ct) { CE ce; - if ((ce = (CE) calloc(1, sizeof(*ce))) == NULL) + if ((ce = (CE) mh_xcalloc(1, sizeof(*ce))) == NULL) adios(EX_OSERR, NULL, "out of memory"); ct->c_cefile = ce; @@ -592,7 +592,7 @@ user_content(FILE *in, char *file, char *buf, CT *ctp) } /* allocate basic Content structure */ - if ((ct = (CT) calloc(1, sizeof(*ct))) == NULL) + if ((ct = (CT) mh_xcalloc(1, sizeof(*ct))) == NULL) adios(EX_OSERR, NULL, "out of memory"); *ctp = ct; @@ -902,7 +902,7 @@ use_forw: ct->c_subtype = MULTI_DIGEST; if ((m = (struct multipart *) - calloc(1, sizeof(*m))) == NULL) + mh_xcalloc(1, sizeof(*m))) == NULL) adios(EX_OSERR, NULL, "out of memory"); ct->c_ctparams = (void *) m; pp = &m->mp_parts; @@ -913,7 +913,7 @@ use_forw: CT p; CE pe; - if ((p = (CT) calloc(1, sizeof(*p))) + if ((p = (CT) mh_xcalloc(1, sizeof(*p))) == NULL) adios(EX_OSERR, NULL, "out of memory"); init_decoded_content(p); @@ -929,7 +929,7 @@ use_forw: msgnum); pe->ce_file = getcpy(buffer); - if ((part = (struct part *) calloc(1, sizeof(*part))) == NULL) + if ((part = (struct part *) mh_xcalloc(1, sizeof(*part))) == NULL) adios(EX_OSERR, NULL, "out of memory"); *pp = part; pp = &part->mp_next; @@ -989,7 +989,7 @@ use_forw: ct->c_type = CT_MULTIPART; ct->c_subtype = vrsn; - if ((m = (struct multipart *) calloc(1, sizeof(*m))) == NULL) + if ((m = (struct multipart *) mh_xcalloc(1, sizeof(*m))) == NULL) adios(EX_OSERR, NULL, "out of memory"); ct->c_ctparams = (void *) m; @@ -1007,7 +1007,7 @@ use_forw: continue; if ((part = (struct part *) - calloc(1, sizeof(*part))) == NULL) + mh_xcalloc(1, sizeof(*part))) == NULL) adios(EX_OSERR, NULL, "out of memory"); *pp = part; pp = &part->mp_next;