From: Ralph Corderoy Date: Fri, 21 Oct 2016 22:15:32 +0000 (+0100) Subject: Replace `if (p) free(p)' with `mh_xfree(p)'. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/9fce8ab3a8a0134261cb796add60a1248e8ae38f?ds=inline;hp=3de39642e3207651b71d6090e5753d23258c778b Replace `if (p) free(p)' with `mh_xfree(p)'. --- diff --git a/uip/ap.c b/uip/ap.c index 48117846..bfec3429 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -174,15 +174,13 @@ process (char *arg, int length) cptr = fmt_findcomp ("text"); if (cptr) { - if (cptr->c_text) - free(cptr->c_text); + mh_xfree(cptr->c_text); cptr->c_text = p->pq_text; p->pq_text = NULL; } cptr = fmt_findcomp ("error"); if (cptr) { - if (cptr->c_text) - free(cptr->c_text); + mh_xfree(cptr->c_text); cptr->c_text = p->pq_error; p->pq_error = NULL; } @@ -191,10 +189,8 @@ process (char *arg, int length) fputs (charstring_buffer (scanl), stdout); charstring_free (scanl); - if (p->pq_text) - free (p->pq_text); - if (p->pq_error) - free (p->pq_error); + mh_xfree(p->pq_text); + mh_xfree(p->pq_error); q = p->pq_next; free ((char *) p); }