]> diplodocus.org Git - nmh/commitdiff
Fixed file descriptor leak in mhfixmsg when run on multiple input files.
authorConrad Hughes <biz_nmh_workers@xrad.org>
Thu, 26 Dec 2019 22:29:59 +0000 (17:29 -0500)
committerDavid Levine <levinedl@acm.org>
Thu, 26 Dec 2019 22:29:59 +0000 (17:29 -0500)
docs/pending-release-notes
uip/mhfixmsg.c

index 7c2e522..5a93216 100644 (file)
@@ -55,3 +55,4 @@ BUG FIXES
 - Fixed inc(1) and %(me) function escape to not obey Local-Mailbox profile
   component.
 - Fixed source charset in mhfixmsg textcharset verbose output.
 - Fixed inc(1) and %(me) function escape to not obey Local-Mailbox profile
   component.
 - Fixed source charset in mhfixmsg textcharset verbose output.
+- Fixed file descriptor leak in mhfixmsg when run on multiple input files.
index 425801d..a820c63 100644 (file)
@@ -551,6 +551,11 @@ main (int argc, char **argv)
                     (void) m_backup (file);
                 }
             }
                     (void) m_backup (file);
                 }
             }
+            if (outfp) {
+                /* close fp opened by the m_mktemp2() call in mhfixmsgsbr() */
+                fclose (outfp);
+                outfp = NULL;
+            }
         }
     } else {
         status = 1;
         }
     } else {
         status = 1;