]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Fixed leak of subfile in mlmmj-send
authormortenp <none@none>
Tue, 1 Jun 2004 20:10:14 +0000 (06:10 +1000)
committermortenp <none@none>
Tue, 1 Jun 2004 20:10:14 +0000 (06:10 +1000)
ChangeLog
src/mlmmj-send.c

index 6870d4c8462a935d5b54ae0ef6a815b624dd1c00..d62ff09f81d245755e590efa63347b852bfd96c6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+ o Fixed leak of subfile in mlmmj-send
 0.5.2
  o footer and customheaders are now accessed from listdir/control/ where
    they belong
index 569946167b11be883d2b082187723db5d3ae1c09..b45210cef841ffe5adf4853f39962c04b7587053 100644 (file)
@@ -587,10 +587,12 @@ int main(int argc, char **argv)
                                               mlmmjbounce);
                                endsmtp(newsockfd);
                                free(newsockfd);
+                               fclose(subfile);
                                exit(EXIT_SUCCESS);
                        } else {
                                syslog(LOG_INFO, "%d/%d connections open",
                                                conncount, MAX_CONNECTIONS);
+                               fclose(subfile);
                        }
                }
                closedir(subddir);
@@ -605,7 +607,6 @@ int main(int argc, char **argv)
 
                rename(mailfilename, archivefilename);
 
-               fclose(subfile);
                free(archivefilename);
        } else if(deletewhensent)
                unlink(mailfilename);