summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorRichard Genoud <richard.genoud@posteo.net>2020-11-03 12:11:14 +0100
committerTom Rini <trini@konsulko.com>2020-11-19 09:45:49 -0500
commit555459e7931f7ae34a4e10d1e21ce7aada7aa59b (patch)
tree0fa67efb3715ef112cc9f0ac979f90bcfd767446 /fs
parent7ce9745cbeae7733a7068f19a7fc3ec8f21dc38c (diff)
downloadu-boot-555459e7931f7ae34a4e10d1e21ce7aada7aa59b.tar.gz
fs/squashfs: sqfs_read: fix another memory leak
data_buffer was allocated in a loop and freed only once. Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/squashfs/sqfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index a9e803cbac..cfea313e34 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -1459,6 +1459,8 @@ int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len,
}
data_offset += table_size;
+ free(data_buffer);
+ data_buffer = NULL;
}
free(finfo.blk_sizes);