Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75750 - trunk/tools/build/v2/engine
From: steven_at_[hidden]
Date: 2011-11-30 10:11:43


Author: steven_watanabe
Date: 2011-11-30 10:11:42 EST (Wed, 30 Nov 2011)
New Revision: 75750
URL: http://svn.boost.org/trac/boost/changeset/75750

Log:
Fix memory leak on Windows.
Text files modified:
   trunk/tools/build/v2/engine/filent.c | 4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)

Modified: trunk/tools/build/v2/engine/filent.c
==============================================================================
--- trunk/tools/build/v2/engine/filent.c (original)
+++ trunk/tools/build/v2/engine/filent.c 2011-11-30 10:11:42 EST (Wed, 30 Nov 2011)
@@ -71,6 +71,7 @@
 
     if ( !d || !d->is_dir )
     {
+ object_free( dir );
         PROFILE_EXIT( FILE_DIRSCAN );
         return;
     }
@@ -117,6 +118,7 @@
         if ( ret = findfirst( filespec->value, finfo, FA_NORMAL | FA_DIREC ) )
         {
             string_free( filespec );
+ object_free( dir );
             PROFILE_EXIT( FILE_DIRSCAN );
             return;
         }
@@ -147,6 +149,7 @@
         if ( ret = ( handle < 0L ) )
         {
             string_free( filespec );
+ object_free( dir );
             PROFILE_EXIT( FILE_DIRSCAN );
             return;
         }
@@ -223,6 +226,7 @@
         }
     }
 
+ object_free( dir );
     PROFILE_EXIT( FILE_DIRSCAN );
 }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk