summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-31 04:27:55 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-31 04:27:55 +0000
commit23c68038b9cc7817e3d90d2b4ae3b97b16f2fa63 (patch)
tree2b7410c906a2b08991fe02e839b3dbc3de1ab027 /source3/param
parentad5c8bad8ac3a7da76c60dc4eb207b7aeeadb198 (diff)
downloadsamba-23c68038b9cc7817e3d90d2b4ae3b97b16f2fa63.tar.gz
samba-23c68038b9cc7817e3d90d2b4ae3b97b16f2fa63.tar.bz2
samba-23c68038b9cc7817e3d90d2b4ae3b97b16f2fa63.zip
pm_process() never closed the file (a memory and file descriptor leak)
(This used to be commit 0d9b0d0fffc2b11fe4897b8b99f321fc7d9a143c)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/params.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/param/params.c b/source3/param/params.c
index 4d1c191b47..a0a259c007 100644
--- a/source3/param/params.c
+++ b/source3/param/params.c
@@ -546,6 +546,7 @@ BOOL pm_process( char *FileName,
if( NULL == bufr )
{
DEBUG(0,("%s memory allocation failure.\n", func));
+ fclose(InFile);
return( False );
}
result = Parse( InFile, sfunc, pfunc );
@@ -554,6 +555,8 @@ BOOL pm_process( char *FileName,
bSize = 0;
}
+ fclose(InFile);
+
if( !result ) /* Generic failure. */
{
DEBUG(0,("%s Failed. Error returned from params.c:parse().\n", func));