Fix a potential memory leak in function DecompressBlobToFile in CompressedBlob.cpp

This commit is contained in:
lioncash 2013-03-07 10:59:50 -05:00
parent f3528277c4
commit 279e3c7e14
1 changed files with 3 additions and 0 deletions

View File

@ -301,7 +301,10 @@ bool DecompressBlobToFile(const char* infile, const char* outfile, CompressCB ca
File::IOFile f(outfile, "wb");
if (!f)
{
delete reader;
return false;
}
const CompressedBlobHeader &header = reader->GetHeader();
u8* buffer = new u8[header.block_size];