From fc29595a1c7150d2393e8962bea12c1b2ef4cf95 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; }