diff --git a/dlls/usp10/bidi.c b/dlls/usp10/bidi.c index d94dc7b6a93..8f94ede9e0f 100644 --- a/dlls/usp10/bidi.c +++ b/dlls/usp10/bidi.c @@ -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; }