diff options
author | Richard Genoud <richard.genoud@posteo.net> | 2020-11-03 12:11:14 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-11-19 09:45:49 -0500 |
commit | 555459e7931f7ae34a4e10d1e21ce7aada7aa59b (patch) | |
tree | 0fa67efb3715ef112cc9f0ac979f90bcfd767446 /fs | |
parent | 7ce9745cbeae7733a7068f19a7fc3ec8f21dc38c (diff) | |
download | u-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.c | 2 |
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); |