aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorRichard Genoud2020-11-03 12:11:11 +0100
committerTom Rini2020-11-19 09:45:49 -0500
commitd1d8d75f69f82f7ef7c55b58a7d9e73055956f3c (patch)
treeed850c710e6f452da145e80bbe4f4ac62445005c /fs
parent35475f83a107901551c31f7bc70f5266862a33e4 (diff)
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 f4cac3e4bf0..13e64bea934 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) {