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

nicodvb subversion at mplayerhq.hu
Mon Dec 31 18:56:30 CET 2007


Author: nicodvb
Date: Mon Dec 31 18:56:30 2007
New Revision: 987

Log:
fix potential memleak, part of ogle-1778

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

Modified: trunk/libdvdnav/src/dvdread/dvd_reader.c
==============================================================================
--- trunk/libdvdnav/src/dvdread/dvd_reader.c	(original)
+++ trunk/libdvdnav/src/dvdread/dvd_reader.c	Mon Dec 31 18:56:30 2007
@@ -263,6 +263,10 @@ static dvd_reader_t *DVDOpenPath( const 
     dvd->isImageFile = 0;
     dvd->dev = 0;
     dvd->path_root = strdup( path_root );
+    if(!dvd->path_root) {
+      free(dvd);
+      return 0;
+    }
 
     dvd->udfcache_level = DEFAULT_UDF_CACHE_LEVEL;
     dvd->udfcache = NULL;



More information about the DVDnav-discuss mailing list