aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/vqa_decoder.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/bladerunner/vqa_decoder.cpp b/engines/bladerunner/vqa_decoder.cpp
index c43e4c3f9d..377251714b 100644
--- a/engines/bladerunner/vqa_decoder.cpp
+++ b/engines/bladerunner/vqa_decoder.cpp
@@ -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));