Fix a potential memory leak in function DecompressBlobToFile in CompressedBlob.cpp
This commit is contained in:
parent
f3528277c4
commit
279e3c7e14
|
@ -301,7 +301,10 @@ bool DecompressBlobToFile(const char* infile, const char* outfile, CompressCB ca
|
||||||
|
|
||||||
File::IOFile f(outfile, "wb");
|
File::IOFile f(outfile, "wb");
|
||||||
if (!f)
|
if (!f)
|
||||||
|
{
|
||||||
|
delete reader;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const CompressedBlobHeader &header = reader->GetHeader();
|
const CompressedBlobHeader &header = reader->GetHeader();
|
||||||
u8* buffer = new u8[header.block_size];
|
u8* buffer = new u8[header.block_size];
|
||||||
|
|
Loading…
Reference in New Issue