Skip to content

Commit

Permalink
fixed resource leak in OpenDecompressor
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Feb 27, 2024
1 parent 205d4b5 commit ef4c4ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/filesystem/source/file_zip.cpp
Expand Up @@ -35,6 +35,7 @@

#include <time.h>
#include <stdexcept>
#include <cstdint>
#include "w_zip.h"
#include "ancientzip.h"
#include "resourcefile.h"
Expand Down
1 change: 1 addition & 0 deletions src/common/filesystem/source/files_decompress.cpp
Expand Up @@ -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))
Expand Down

0 comments on commit ef4c4ee

Please sign in to comment.