Replace free() with mh_free0()
[mmh] / uip / spost.c
index 4a24fc4..e2b5a88 100644 (file)
@@ -243,7 +243,7 @@ main(int argc, char **argv)
                                cp = add(buf, cp);
                        }
                        putfmt(name, cp, out);
-                       free(cp);
+                       mh_free0(&cp);
                        continue;
 
                case BODY:
@@ -319,7 +319,7 @@ main(int argc, char **argv)
                adios(EX_DATAERR, NULL, "message has no recipients");
        }
 
-       sargv = mh_xmalloc(sizeof(char **) * (recipientsc + 4));
+       sargv = mh_xcalloc(recipientsc + 4, sizeof(char **));
 
        argp = sargv;
        *argp++ = "send-mail";
@@ -554,7 +554,7 @@ putadr(char *name, struct mailname *nl)
                                cp = getcpy(mp->m_gname);
                                cp = add(";", cp);
                                linepos = putone(cp, linepos, namelen);
-                               free(cp);
+                               mh_free0(&cp);
                                cp = NULL;
                        }
                } else {