Mercurial > libdvdnav.hg
changeset 327:d0a19ce1aa3d src
fix potential memleak, part of ogle-1778
author | nicodvb |
---|---|
date | Mon, 31 Dec 2007 17:56:30 +0000 |
parents | c1d5abe51fda |
children | 727b18c5824b |
files | dvdread/dvd_reader.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dvdread/dvd_reader.c Mon Dec 31 17:48:08 2007 +0000 +++ b/dvdread/dvd_reader.c Mon Dec 31 17:56:30 2007 +0000 @@ -263,6 +263,10 @@ 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;