#include <h/fmt_scan.h>
#include <h/mime.h>
#include <h/mhparse.h>
+#include "h/done.h"
#include <h/utils.h>
#include <h/signals.h>
-#include "../sbr/m_maildir.h"
-#include "../sbr/m_mktemp.h"
-#include "../sbr/mime_type.h"
+#include "sbr/m_maildir.h"
+#include "sbr/m_mktemp.h"
+#include "sbr/mime_type.h"
#include "mhmisc.h"
#include "mhfree.h"
#include "mhoutsbr.h"
* Read the standard profile setup
*/
if ((fp = fopen (cp = etcpath ("mhn.defaults"), "r"))) {
- readconfig ((struct node **) 0, fp, cp, 0);
+ readconfig(NULL, fp, cp, 0);
fclose (fp);
}
status = 1;
}
- mh_xfree(maildir);
+ free(maildir);
free (cts);
if (fx.fixtypes != NULL) { svector_free (fx.fixtypes); }
fprintf (fpout, "%s:%s%s\n", np, new_ctline,
FENDNULL(new_params));
free(new_ctline);
- mh_xfree(new_params);
+ free(new_params);
}
free (vp);
for (hf = ct->c_first_hf; hf; hf = hf->next) {
char *name = hf->name;
- for (; *name && isspace ((unsigned char) *name); ++name) {
+ for (; isspace((unsigned char)*name); ++name) {
continue;
}
boundary_in_content (&new_part->c_cefile.ce_fp,
new_part->c_cefile.ce_file,
boundary)) == NOTOK) {
- free_content (ct);
- return NULL;
+ goto return_null;
}
}
boundary_in_content (&new_part->c_fp,
new_part->c_file,
boundary)) == NOTOK) {
- free_content (ct);
- return NULL;
+ goto return_null;
}
}
if (found_boundary) {
inform("giving up trying to find a unique boundary");
- free_content (ct);
- return NULL;
+ goto return_null;
}
}
free (boundary);
return ct;
+
+return_null:
+ free_content(ct);
+ free(boundary);
+ return NULL;
}
inform("unable to write temporary file %s, continuing...",
stripped_content_file);
(void) m_unlink (stripped_content_file);
+ free(stripped_content_file);
status = NOTOK;
} else {
/* Replace the decoded file with the converted one. */
if (ct->c_cefile.ce_file && ct->c_cefile.ce_unlink)
(void) m_unlink (ct->c_cefile.ce_file);
- mh_xfree(ct->c_cefile.ce_file);
+ free(ct->c_cefile.ce_file);
ct->c_cefile.ce_file = stripped_content_file;
ct->c_cefile.ce_unlink = 1;