[23278] in Source-Commits
/svn/athena r22937 - trunk/third/nmh/uip
daemon@ATHENA.MIT.EDU (amb@MIT.EDU)
Tue Apr 22 14:33:17 2008
Date: Tue, 22 Apr 2008 14:32:47 -0400 (EDT)
From: amb@MIT.EDU
Message-Id: <200804221832.OAA29905@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: amb
Date: 2008-04-22 14:32:46 -0400 (Tue, 22 Apr 2008)
New Revision: 22937
Modified:
trunk/third/nmh/uip/mhstoresbr.c
Log:
In some situations, output_content_file returns early and misses the
file pointer cleanup that's otherwise done at the end of the function.
This makes sure we're not leaking the relevant descriptors.
Modified: trunk/third/nmh/uip/mhstoresbr.c
===================================================================
--- trunk/third/nmh/uip/mhstoresbr.c 2008-04-22 10:30:44 UTC (rev 22936)
+++ trunk/third/nmh/uip/mhstoresbr.c 2008-04-22 18:32:46 UTC (rev 22937)
@@ -681,6 +681,8 @@
return NOTOK;
if (!strcmp (file, ct->c_storage)) {
(*ct->c_ceclosefnx) (ct);
+ fclose (ct->c_fp);
+ ct->c_fp = NULL;
return OK;
}