Commit b7bf68f4 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

rpcrt4: Don't call IUnknown_AddRef if there is no outer unknown in

StdProxy_Construct as it will just crash anyway.
parent 21fb7ab6
......@@ -188,7 +188,11 @@ HRESULT WINAPI StdProxy_Construct(REFIID riid,
This->pChannel = NULL;
*ppProxy = (LPRPCPROXYBUFFER)&This->lpVtbl;
*ppvObj = &This->PVtbl;
IUnknown_AddRef((IUnknown *)*ppvObj);
/* if there is no outer unknown then the caller will control the lifetime
* of the proxy object through the proxy buffer, so no need to increment the
* ref count of the proxy object */
if (pUnkOuter)
IUnknown_AddRef((IUnknown *)*ppvObj);
IPSFactoryBuffer_AddRef(pPSFactory);
return S_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment