Module: wine Branch: master Commit: c217dd36cb783fb9debd479c616da7d8280432fb URL: https://source.winehq.org/git/wine.git/?a=commit;h=c217dd36cb783fb9debd479c6...
Author: Piotr Caban piotr@codeweavers.com Date: Wed Jul 11 12:32:25 2018 +0200
msvcp120: Fix concurrent_vector_int_dtor helper.
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/msvcp120/tests/msvcp120.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index 959f7a8..cd8a514 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -2576,10 +2576,14 @@ static void concurrent_vector_int_dtor(vector_base_v4 *this)
blocks = (size_t)call_func2(p_vector_base_v4__Internal_clear, this, concurrent_vector_int_destroy); - while(this->first_block && blocks >= this->first_block) { + for(blocks--; blocks >= this->first_block; blocks--) { vector_alloc_count--; - free(this->segment[blocks - this->first_block]); - blocks--; + free(this->segment[blocks]); + } + + if(this->first_block) { + vector_alloc_count--; + free(this->segment[0]); }
call_func1(p_vector_base_v4_dtor, this);