X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fap.c;h=041abf1496044ac85a4fe21ff22dc76fd4722107;hb=d4c34b4439a9dbd89664de460ed37ecddc260fb1;hp=8156517babfd622ea597bb5c0c0b0e72b4a097c2;hpb=850059f6637354d31129f303151f9f7d30514c9e;p=mmh diff --git a/uip/ap.c b/uip/ap.c index 8156517..041abf1 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -138,9 +138,7 @@ process(char *arg, int norm) (q = &pq)->pq_next = NULL; while ((cp = getname(arg))) { - if ((p = (struct pqpair *) - mh_xcalloc((size_t) 1, sizeof(*p))) == NULL) - adios(EX_OSERR, NULL, "unable to allocate pqpair memory"); + p = mh_xcalloc(1, sizeof(*p)); if ((mp = getm(cp, NULL, 0, norm, error)) == NULL) { p->pq_text = getcpy(cp); p->pq_error = getcpy(error); @@ -163,11 +161,11 @@ process(char *arg, int norm) fmt_scan(fmt, buffer, BUFSIZ, dat); fputs(buffer, stdout); - free(p->pq_text); + mh_free0(&(p->pq_text)); if (p->pq_error) - free(p->pq_error); + mh_free0(&(p->pq_error)); q = p->pq_next; - free((char *) p); + mh_free0(&p); } return status;