[DVDnav-discuss] r883 - trunk/libdvdnav/src/dvdread/dvd_reader.c

nicodvb subversion at mplayerhq.hu
Thu Apr 19 00:41:10 CEST 2007


Author: nicodvb
Date: Thu Apr 19 00:41:10 2007
New Revision: 883

Modified:
   trunk/libdvdnav/src/dvdread/dvd_reader.c

Log:
avoid leaking file descriptors obtained by opendir(); synced with upstream as reported by Diego Petteno'

Modified: trunk/libdvdnav/src/dvdread/dvd_reader.c
==============================================================================
--- trunk/libdvdnav/src/dvdread/dvd_reader.c	(original)
+++ trunk/libdvdnav/src/dvdread/dvd_reader.c	Thu Apr 19 00:41:10 2007
@@ -586,10 +586,12 @@ static int findDirFile( const char *path
             sprintf( filename, "%s%s%s", path,
                      ( ( path[ strlen( path ) - 1 ] == '/' ) ? "" : "/" ),
                      ent->d_name );
+            closedir( dir );
             return 0;
         }
     }
 
+    closedir( dir );
     return -1;
 }
 



More information about the DVDnav-discuss mailing list