Module: wine Branch: master Commit: 9ed47775d6a789f0c397c622279ab861a3e8425f URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ed47775d6a789f0c397c62227...
Author: Huw Davies huw@codeweavers.com Date: Tue Oct 27 14:42:30 2015 +0000
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
---
dlls/oleaut32/usrmarshal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/oleaut32/usrmarshal.c b/dlls/oleaut32/usrmarshal.c index 39a5f8c..303ec69 100644 --- a/dlls/oleaut32/usrmarshal.c +++ b/dlls/oleaut32/usrmarshal.c @@ -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); }