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:
Richard Genoud 2020-11-03 12:11:11 +01:00 committed by Tom Rini
parent 35475f83a1
commit d1d8d75f69

View File

@ -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) {