]> diplodocus.org Git - nmh/commitdiff
Replace `if (p) free(p)' with `mh_xfree(p)'.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 21 Oct 2016 23:21:16 +0000 (00:21 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 21 Oct 2016 23:21:16 +0000 (00:21 +0100)
sbr/mf.c

index 63b13ba411f8e9bc1d033984f7730c0c755c9d09..ebd130d2dfe30706112f407495a0c36f8127275e 100644 (file)
--- 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: