aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorRichard Genoud <richard.genoud@posteo.net>2020-11-03 12:11:11 +0100
committerTom Rini <trini@konsulko.com>2020-11-19 09:45:49 -0500
commitd1d8d75f69f82f7ef7c55b58a7d9e73055956f3c (patch)
treeed850c710e6f452da145e80bbe4f4ac62445005c /fs
parent35475f83a107901551c31f7bc70f5266862a33e4 (diff)
downloadu-boot-d1d8d75f69f82f7ef7c55b58a7d9e73055956f3c.zip
u-boot-d1d8d75f69f82f7ef7c55b58a7d9e73055956f3c.tar.gz
u-boot-d1d8d75f69f82f7ef7c55b58a7d9e73055956f3c.tar.bz2
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')
-rw-r--r--fs/squashfs/sqfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index f4cac3e..13e64be 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) {