mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
SCI: Fix (unlikely) memory leak
This commit is contained in:
parent
d8eb01a729
commit
38fa74d24a
@ -386,8 +386,10 @@ ParseRuleList *Vocabulary::buildGNF(bool verbose) {
|
||||
|
||||
for (uint i = 1; i < _parserBranches.size(); i++) { // branch rule 0 is treated specially
|
||||
ParseRule *rule = _vbuild_rule(&_parserBranches[i]);
|
||||
if (!rule)
|
||||
if (!rule) {
|
||||
freeRuleList(ntlist);
|
||||
return NULL;
|
||||
}
|
||||
ntlist = _vocab_add_rule(ntlist, rule);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user