From: Richard Genoud Date: Tue, 3 Nov 2020 11:11:11 +0000 (+0100) Subject: fs/squashfs: sqfs_read: fix dangling pointer dirs->entry X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=d1d8d75f69f82f7ef7c55b58a7d9e73055956f3c;p=u-boot.git 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 --- diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c index f4cac3e4bf..13e64bea93 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) {