usp10: Avoid leaking "open_stack" and "stack_index" in case of 0 "pair_count" in computeBracketPairs().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2018-02-18 21:38:37 +03:30 committed by Alexandre Julliard
parent 77c7475269
commit 99e61cee75
1 changed files with 4 additions and 2 deletions

View File

@ -741,6 +741,10 @@ static BracketPair *computeBracketPairs(IsolatedRun *iso_run)
}
}
}
heap_free(open_stack);
heap_free(stack_index);
if (pair_count == 0)
{
heap_free(out);
@ -749,8 +753,6 @@ static BracketPair *computeBracketPairs(IsolatedRun *iso_run)
else if (pair_count > 1)
qsort(out, pair_count, sizeof(BracketPair), compr);
heap_free(open_stack);
heap_free(stack_index);
return out;
}