diff --git a/src/common/filesystem/source/file_zip.cpp b/src/common/filesystem/source/file_zip.cpp index 9f10d00a73..8351b71464 100644 --- a/src/common/filesystem/source/file_zip.cpp +++ b/src/common/filesystem/source/file_zip.cpp @@ -35,6 +35,7 @@ #include #include +#include #include "w_zip.h" #include "ancientzip.h" #include "resourcefile.h" diff --git a/src/common/filesystem/source/files_decompress.cpp b/src/common/filesystem/source/files_decompress.cpp index 9d00ee6dfa..3f7dfb8659 100644 --- a/src/common/filesystem/source/files_decompress.cpp +++ b/src/common/filesystem/source/files_decompress.cpp @@ -985,6 +985,7 @@ bool OpenDecompressor(FileReader& self, FileReader &parent, FileReader::Size len // read everything into a MemoryArrayReader. FileData data(nullptr, length); fr->Read(data.writable(), length); + delete fr; fr = new MemoryArrayReader(data); } else if ((flags & DCF_SEEKABLE))