oleaut32: Fix leak in typelib marshaler when invoking IDispatch methods.

This commit is contained in:
Octavian Voicu 2011-08-25 18:50:20 +03:00 committed by Alexandre Julliard
parent 82ef9f960d
commit 8177b4793a
2 changed files with 17 additions and 8 deletions

View file

@ -1000,6 +1000,12 @@ static void test_typelibmarshal(void)
IKindaEnumWidget_Release(pKEW);
/* call GetTypeInfoCount (direct) */
hr = IWidget_GetTypeInfoCount(pWidget, &uval);
ok_ole_success(hr, IWidget_GetTypeInfoCount);
hr = IWidget_GetTypeInfoCount(pWidget, &uval);
ok_ole_success(hr, IWidget_GetTypeInfoCount);
hr = IWidget_QueryInterface(pWidget, &IID_IDispatch, (void **)&pDispatch);
ok_ole_success(hr, IWidget_QueryInterface);

View file

@ -2001,6 +2001,8 @@ TMStubImpl_Invoke(
}
if (This->dispatch_derivative && xmsg->iMethod < sizeof(IDispatchVtbl)/sizeof(void *))
{
if (!This->dispatch_stub)
{
IPSFactoryBuffer *factory_buffer;
hres = get_facbuf_for_iid(&IID_IDispatch, &factory_buffer);
@ -2012,6 +2014,7 @@ TMStubImpl_Invoke(
}
if (hres != S_OK)
return hres;
}
return IRpcStubBuffer_Invoke(This->dispatch_stub, xmsg, rpcchanbuf);
}