Rob Shearman : oleaut32: Fix a reference count leak in NonOleAutomation_GetTypeInfo.

Alexandre Julliard julliard at winehq.org
Thu Nov 19 10:15:25 CST 2009


Module: wine
Branch: master
Commit: 87c47219ae944d8ea4ff104fefc897f9de401ae0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=87c47219ae944d8ea4ff104fefc897f9de401ae0

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Thu Nov 19 11:54:41 2009 +0000

oleaut32: Fix a reference count leak in NonOleAutomation_GetTypeInfo.

Also enable a test which now works in Wine.

---

 dlls/oleaut32/tests/tmarshal.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
index 7a6c49e..46f1cdc 100644
--- a/dlls/oleaut32/tests/tmarshal.c
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -915,6 +915,7 @@ static ITypeInfo *NonOleAutomation_GetTypeInfo(void)
         ITypeInfo *pTypeInfo;
         hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_INonOleAutomation, &pTypeInfo);
         ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid);
+        ITypeLib_Release(pTypeLib);
         return pTypeInfo;
     }
     return NULL;
@@ -1260,10 +1261,8 @@ static void test_typelibmarshal(void)
     dispparams.cArgs = 1;
     dispparams.rgvarg = vararg;
     VariantInit(&varresult);
-#if 0 /* NULL unknown not currently marshaled correctly */
     hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL);
     ok(hr == DISP_E_TYPEMISMATCH, "IDispatch_Invoke should have returned DISP_E_TYPEMISMATCH instead of 0x%08x\n", hr);
-#endif
     VariantClear(&varresult);
 
     /* tests bad param type */




More information about the wine-cvs mailing list