]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs/squashfs: sqfs_read_inode_table: fix dangling pointer
authorRichard Genoud <richard.genoud@posteo.net>
Tue, 3 Nov 2020 11:11:07 +0000 (12:11 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 19 Nov 2020 14:45:49 +0000 (09:45 -0500)
inode_table should not be left dangling as it may be freed in sqfs_opendir

Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
fs/squashfs/sqfs.c

index 1714306e747c05de3914eeef73dbddf3365a20f4..72181f38332970dc7e62623ddcf98635e9670b86 100644 (file)
@@ -731,6 +731,7 @@ static int sqfs_read_inode_table(unsigned char **inode_table)
                                              src_table, src_len);
                        if (ret) {
                                free(*inode_table);
+                               *inode_table = NULL;
                                goto free_itb;
                        }