diff options
author | Richard Genoud <richard.genoud@posteo.net> | 2020-11-03 14:11:11 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-11-19 17:45:49 +0300 |
commit | d1d8d75f69f82f7ef7c55b58a7d9e73055956f3c (patch) | |
tree | ed850c710e6f452da145e80bbe4f4ac62445005c /fs/squashfs/sqfs.c | |
parent | 35475f83a107901551c31f7bc70f5266862a33e4 (diff) | |
download | u-boot-d1d8d75f69f82f7ef7c55b58a7d9e73055956f3c.tar.xz |
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>
Diffstat (limited to 'fs/squashfs/sqfs.c')
-rw-r--r-- | fs/squashfs/sqfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c index f4cac3e4bf..13e64bea93 100644 --- a/fs/squashfs/sqfs.c +++ b/fs/squashfs/sqfs.c @@ -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) { |