oleaut32: Clear any existing interface before calling WdtpInterfacePointer_UserUnmarshal().

The code has already called VariantClear() which has released the
interface yet not set it to NULL.  This is to prevent a double-release
after a forthcoming patch to WdtpInterfacePointer_UserUnmarshal().

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2015-10-27 14:42:30 +00:00 committed by Alexandre Julliard
parent c820139b0f
commit 9ed47775d6

View file

@ -349,11 +349,12 @@ static unsigned char *interface_variant_unmarshal(ULONG *pFlags, unsigned char *
ptr = *(DWORD*)Buffer;
Buffer += sizeof(DWORD);
/* Clear any existing interface which WdtpInterfacePointer_UserUnmarshal()
would try to release. This has been done already with a VariantClear(). */
*ppunk = NULL;
if(!ptr)
{
*ppunk = NULL;
return Buffer;
}
return WdtpInterfacePointer_UserUnmarshal(pFlags, Buffer, ppunk, riid);
}