Module: wine Branch: master Commit: 2a9168e586e067a1c7a63efb3472f6e5194d6912 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2a9168e586e067a1c7a63efb34...
Author: Rob Shearman rob@codeweavers.com Date: Fri Dec 7 14:14:33 2007 +0000
oleaut32: Set the number of locks held on the safe arrays in the safe array tests to zero before destroying them, otherwise the operation will fail and leak memory.
---
dlls/oleaut32/tests/usrmarshal.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/oleaut32/tests/usrmarshal.c b/dlls/oleaut32/tests/usrmarshal.c index 3139442..20fc2f8 100644 --- a/dlls/oleaut32/tests/usrmarshal.c +++ b/dlls/oleaut32/tests/usrmarshal.c @@ -208,6 +208,7 @@ static void test_marshal_LPSAFEARRAY(void) LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); } HeapFree(GetProcessHeap(), 0, buffer); + lpsa->cLocks = 0; SafeArrayDestroy(lpsa);
/* test NULL safe array */ @@ -244,6 +245,7 @@ static void test_marshal_LPSAFEARRAY(void) check_safearray(buffer, lpsa);
HeapFree(GetProcessHeap(), 0, buffer); + lpsa->cLocks = 0; SafeArrayDestroy(lpsa);
/* VARTYPE-less arrays can be marshaled if cbElements is 1,2,4 or 8 as type SF_In */ @@ -1125,6 +1127,7 @@ static void test_marshal_VARIANT(void) VARIANT_UserFree(&umcb.Flags, &v2); } HeapFree(GetProcessHeap(), 0, buffer); + lpsa->cLocks = 0; SafeArrayDestroy(lpsa);
/*** VARIANT BYREF ***/