Plug memory leak in iso9660_ifs_readdir() and udf_open().
Patches from Pete Batard. See libcdio_devel from Jan 16, 2012.
This commit is contained in:
@@ -1390,7 +1390,11 @@ iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[])
|
||||
}
|
||||
|
||||
ret = iso9660_iso_seek_read (p_iso, _dirbuf, p_stat->lsn, p_stat->secsize);
|
||||
if (ret != ISO_BLOCKSIZE*p_stat->secsize) return NULL;
|
||||
if (ret != ISO_BLOCKSIZE*p_stat->secsize)
|
||||
{
|
||||
free (_dirbuf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (offset < (p_stat->secsize * ISO_BLOCKSIZE))
|
||||
{
|
||||
@@ -1420,6 +1424,7 @@ iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[])
|
||||
return NULL;
|
||||
}
|
||||
|
||||
free (p_stat->rr.psz_symlink);
|
||||
free (p_stat);
|
||||
return retval;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user