From: Ralph Corderoy Date: Fri, 21 Oct 2016 23:21:16 +0000 (+0100) Subject: Replace `if (p) free(p)' with `mh_xfree(p)'. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/c53b61f8d4a809ab53e954594874285ca32d1b11?ds=sidebyside;hp=a8f44e52c36e7dee41d2e6a913e83e1d9bb9c1cc Replace `if (p) free(p)' with `mh_xfree(p)'. --- diff --git a/sbr/mf.c b/sbr/mf.c index 63b13ba4..ebd130d2 100644 --- a/sbr/mf.c +++ b/sbr/mf.c @@ -180,18 +180,12 @@ getadrx (const char *addrs, int eai) char *bp; struct adrx *adrxp = &adrxs2; - if (pers) - free (pers); - if (mbox) - free (mbox); - if (host) - free (host); - if (path) - free (path); - if (grp) - free (grp); - if (note) - free (note); + mh_xfree(pers); + mh_xfree(mbox); + mh_xfree(host); + mh_xfree(path); + mh_xfree(grp); + mh_xfree(note); pers = mbox = host = path = grp = note = NULL; err[0] = 0; @@ -297,10 +291,8 @@ again: ; return NOTOK; } case LX_COMA: - if (note) { - free (note); - note = NULL; - } + mh_xfree(note); + note = NULL; goto again; case LX_END: