Fix a memleak on an error condition.
This commit is contained in:
parent
cf577e9e80
commit
cf0e337b27
1 changed files with 1 additions and 0 deletions
|
@ -212,6 +212,7 @@ CChunkFileReader::Error CChunkFileReader::LoadFile(const std::string& _rFilename
|
|||
if (!pFile.ReadBytes(buffer, sz))
|
||||
{
|
||||
ERROR_LOG(COMMON, "ChunkReader: Error reading file");
|
||||
delete [] buffer;
|
||||
return ERROR_BAD_FILE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue