mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 15:40:57 +00:00
BLADERUNNER: Fix potential memory leak (CppCheck warning)
This commit is contained in:
parent
8aeeacf204
commit
0c6496b111
@ -493,8 +493,10 @@ bool VQADecoder::readLNIN(Common::SeekableReadStream *s, uint32 size) {
|
||||
}
|
||||
|
||||
readIFFChunkHeader(_s, &chd);
|
||||
if (chd.id != kLNID)
|
||||
if (chd.id != kLNID) {
|
||||
free(loopNameOffsets);
|
||||
return false;
|
||||
}
|
||||
|
||||
char *names = (char*)malloc(roundup(chd.size));
|
||||
s->read(names, roundup(chd.size));
|
||||
|
Loading…
x
Reference in New Issue
Block a user