diff --git a/lib/iso9660/iso9660_fs.c b/lib/iso9660/iso9660_fs.c index 9533fcf2..e918110c 100644 --- a/lib/iso9660/iso9660_fs.c +++ b/lib/iso9660/iso9660_fs.c @@ -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; } diff --git a/lib/udf/udf_fs.c b/lib/udf/udf_fs.c index 6d1e833d..e5900c78 100644 --- a/lib/udf/udf_fs.c +++ b/lib/udf/udf_fs.c @@ -404,6 +404,7 @@ udf_open (const char *psz_path) return p_udf; error: + cdio_stdio_destroy(p_udf->stream); free(p_udf); return NULL; } @@ -473,7 +474,7 @@ udf_get_volumeset_id(udf_t *p_udf, /*out*/ uint8_t *volsetid, NULL is returned if the partition is not found or a root is not found or there is on error. - Caller must free result - use udf_file_free for that. + Caller must free result - use udf_dirent_free for that. */ udf_dirent_t * udf_get_root (udf_t *p_udf, bool b_any_partition, partition_num_t i_partition)