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:
parent
77c7475269
commit
99e61cee75
|
@ -741,6 +741,10 @@ static BracketPair *computeBracketPairs(IsolatedRun *iso_run)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
heap_free(open_stack);
|
||||||
|
heap_free(stack_index);
|
||||||
|
|
||||||
if (pair_count == 0)
|
if (pair_count == 0)
|
||||||
{
|
{
|
||||||
heap_free(out);
|
heap_free(out);
|
||||||
|
@ -749,8 +753,6 @@ static BracketPair *computeBracketPairs(IsolatedRun *iso_run)
|
||||||
else if (pair_count > 1)
|
else if (pair_count > 1)
|
||||||
qsort(out, pair_count, sizeof(BracketPair), compr);
|
qsort(out, pair_count, sizeof(BracketPair), compr);
|
||||||
|
|
||||||
heap_free(open_stack);
|
|
||||||
heap_free(stack_index);
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue