From 23c68038b9cc7817e3d90d2b4ae3b97b16f2fa63 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 31 Oct 1997 04:27:55 +0000 Subject: pm_process() never closed the file (a memory and file descriptor leak) (This used to be commit 0d9b0d0fffc2b11fe4897b8b99f321fc7d9a143c) --- source3/param/params.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/param') 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)); -- cgit