]> diplodocus.org Git - nmh/blobdiff - uip/mhfixmsg.c
Added const to argument of getcpy().
[nmh] / uip / mhfixmsg.c
index 9e672b4..2d2fde1 100644 (file)
@@ -11,7 +11,6 @@
 #include <h/mhparse.h>
 #include <h/utils.h>
 #include <h/signals.h>
-#include <signal.h>
 #include <fcntl.h>
 #ifdef HAVE_ICONV
 #   include <iconv.h>
@@ -456,6 +455,7 @@ mhfixmsgsbr (CT *ctp, const fix_transformations *fx, char *outfile) {
     }
 
     if (modify_inplace) {
+        if (status != OK) unlink (outfile);
         free (outfile);
         outfile = NULL;
     }
@@ -949,7 +949,11 @@ ensure_text_plain (CT *ct, CT parent, int *message_mods) {
                         free_content (mp_alt);
                         status = NOTOK;
                     }
+                } else {
+                    status = NOTOK;
                 }
+            } else {
+                status = NOTOK;
             }
         }
         break;
@@ -1458,6 +1462,7 @@ decode_text_parts (CT ct, int encoding, int *message_mods) {
                     unlink (ct->c_cefile.ce_file);
                     free (ct->c_cefile.ce_file);
                     ct->c_cefile.ce_file = NULL;
+                    status = NOTOK;
                 } else if (ct->c_encoding == CE_QUOTED &&
                            ct_encoding == CE_8BIT  &&  encoding == CE_7BIT) {
                     if (verbosw) {
@@ -1470,6 +1475,7 @@ decode_text_parts (CT ct, int encoding, int *message_mods) {
                     unlink (ct->c_cefile.ce_file);
                     free (ct->c_cefile.ce_file);
                     ct->c_cefile.ce_file = NULL;
+                    status = NOTOK;
                 } else {
                     int enc;
                     if (ct_encoding == CE_BINARY)
@@ -1826,6 +1832,8 @@ write_content (CT ct, char *input_filename, char *outfile, int modify_inplace,
                 }
 
                 free (infile);
+            } else {
+                status = NOTOK;
             }
         } else {
             /* No modifications and didn't need the tmp outfile. */