Replace free() with mh_free0()
[mmh] / uip / forw.c
index 4bb03d3..5b577bd 100644 (file)
@@ -333,10 +333,10 @@ build_form(char *form, char *digest, int volume, int issue)
        if ((in = dup(fileno(tmp))) == NOTOK)
                adios(EX_OSERR, "dup", "unable to");
 
-       line = mh_xmalloc((unsigned) fmtsize);
+       line = mh_xcalloc(fmtsize, sizeof(char));
        fmt_scan(fmt, line, fmtsize, dat);
        fputs(line, tmp);
-       free(line);
+       mh_free0(&line);
        if (fclose(tmp))
                adios(EX_IOERR, tmpfil, "error writing");