From 20353fa19533f68d89b168ea5f32a47e2e9d7b89 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 21 Feb 2020 00:03:48 -0800 Subject: [PATCH] VFS: Fix memory leak if attempt to open a 7z fails --- src/util/vfs/vfs-lzma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/vfs/vfs-lzma.c b/src/util/vfs/vfs-lzma.c index d56883c48..a1c259ee4 100644 --- a/src/util/vfs/vfs-lzma.c +++ b/src/util/vfs/vfs-lzma.c @@ -105,6 +105,7 @@ struct VDir* VDirOpen7z(const char* path, int flags) { if (res != SZ_OK) { SzArEx_Free(&vd->db, &vd->allocImp); File_Close(&vd->archiveStream.file); + free(vd->lookStream.buf); free(vd); return 0; }