Commit 3815eca2 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

oleaut32: Set safearray pointer to NULL in LPSAFEARRAY_UserFree.

parent 6183f4fc
...@@ -277,6 +277,7 @@ static void test_marshal_LPSAFEARRAY(void) ...@@ -277,6 +277,7 @@ static void test_marshal_LPSAFEARRAY(void)
ok(lpsa2->cLocks == 0, "got lock count %u, expected 0\n", lpsa2->cLocks); ok(lpsa2->cLocks == 0, "got lock count %u, expected 0\n", lpsa2->cLocks);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE);
LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2);
ok(!lpsa2, "lpsa2 was not set to 0 by LPSAFEARRAY_UserFree\n");
HeapFree(GetProcessHeap(), 0, buffer); HeapFree(GetProcessHeap(), 0, buffer);
lpsa->cLocks = 0; lpsa->cLocks = 0;
hr = SafeArrayDestroy(lpsa); hr = SafeArrayDestroy(lpsa);
......
...@@ -1091,6 +1091,7 @@ void WINAPI LPSAFEARRAY_UserFree(ULONG *pFlags, LPSAFEARRAY *ppsa) ...@@ -1091,6 +1091,7 @@ void WINAPI LPSAFEARRAY_UserFree(ULONG *pFlags, LPSAFEARRAY *ppsa)
TRACE("("); dump_user_flags(pFlags); TRACE(", &%p\n", *ppsa); TRACE("("); dump_user_flags(pFlags); TRACE(", &%p\n", *ppsa);
SafeArrayDestroy(*ppsa); SafeArrayDestroy(*ppsa);
*ppsa = NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment