fs/squashfs: sqfs_read: fix dangling pointer dirs->entry
dirs->entry shouldn't be left dangling as it could be freed twice. Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
This commit is contained in:
parent
35475f83a1
commit
d1d8d75f69
@ -1336,6 +1336,7 @@ int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len,
|
||||
break;
|
||||
|
||||
free(dirs->entry);
|
||||
dirs->entry = NULL;
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
|
Loading…
Reference in New Issue
Block a user