From: Richard Genoud Date: Tue, 3 Nov 2020 11:11:14 +0000 (+0100) Subject: fs/squashfs: sqfs_read: fix another memory leak X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=555459e7931f7ae34a4e10d1e21ce7aada7aa59b;p=u-boot.git fs/squashfs: sqfs_read: fix another memory leak data_buffer was allocated in a loop and freed only once. Signed-off-by: Richard Genoud --- 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);