[PATCH 1/5] oleaut32: Clear any existing interface before calling WdtpInterfacePointer_UserUnmarshal().
Huw Davies
huw at codeweavers.com
Tue Oct 27 09:42:30 CDT 2015
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 at codeweavers.com>
---
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);
}
--
1.8.0
More information about the wine-patches
mailing list