X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/92c3b05ef3e582d64b3cecfc261fdd66ef13a4ef..b3bcb44d340fd017efac8bb31c3859dd91b24af3:/uip/mhfixmsg.c?ds=sidebyside diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index cab759a4..486c7cc4 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -9,6 +9,7 @@ #include #include #include +#include "h/done.h" #include #include #include "sbr/m_maildir.h" @@ -1742,8 +1743,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 +1754,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 +1774,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 +1819,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,6 +2293,7 @@ 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. */