X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/de06ed5f176a5fa3eb5522bb9a9741f9c3f1d0f4..e6a316e73b70ee428ec701a5df2bcf795d4b1802:/uip/mhfixmsg.c diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index 438f8a66..2bbb0453 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -11,9 +11,9 @@ #include #include #include -#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" @@ -495,7 +495,7 @@ main (int argc, char **argv) { status = 1; } - mh_xfree(maildir); + free(maildir); free (cts); if (fx.fixtypes != NULL) { svector_free (fx.fixtypes); } @@ -866,7 +866,7 @@ replace_boundary (CT ct, char *file, char *boundary) { fprintf (fpout, "%s:%s%s\n", np, new_ctline, FENDNULL(new_params)); free(new_ctline); - mh_xfree(new_params); + free(new_params); } free (vp); @@ -1114,7 +1114,7 @@ fix_composite_cte (CT ct, int *message_mods) { 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; } @@ -1742,8 +1742,7 @@ build_multipart_alt (CT first_alt, CT new_part, int type, int subtype) { 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; } } @@ -1754,8 +1753,7 @@ build_multipart_alt (CT first_alt, CT new_part, int type, int subtype) { boundary_in_content (&new_part->c_fp, new_part->c_file, boundary)) == NOTOK) { - free_content (ct); - return NULL; + goto return_null; } } @@ -1775,8 +1773,7 @@ build_multipart_alt (CT first_alt, CT new_part, int type, int subtype) { if (found_boundary) { inform("giving up trying to find a unique boundary"); - free_content (ct); - return NULL; + goto return_null; } } @@ -1821,6 +1818,11 @@ build_multipart_alt (CT first_alt, CT new_part, int type, int subtype) { free (boundary); return ct; + +return_null: + free_content(ct); + free(boundary); + return NULL; } @@ -2290,13 +2292,14 @@ strip_crs (CT ct, int *message_mods) { 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;