Commit 0197c2c2 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shdocvw: Fix module ref counting.

parent d7e88ff9
......@@ -54,6 +54,7 @@ static HRESULT WINAPI WBCF_QueryInterface(LPCLASSFACTORY iface,
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) {
*ppobj = iface;
IClassFactory_AddRef(iface);
return S_OK;
}
......
......@@ -37,9 +37,10 @@ static HRESULT WINAPI UrlHistoryStg_QueryInterface(IUrlHistoryStg2 *iface, REFII
*ppv = iface;
}
if(*ppv)
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
WARN("(%s %p)\n", debugstr_guid(riid), ppv);
return E_NOINTERFACE;
......@@ -47,11 +48,13 @@ static HRESULT WINAPI UrlHistoryStg_QueryInterface(IUrlHistoryStg2 *iface, REFII
static ULONG WINAPI UrlHistoryStg_AddRef(IUrlHistoryStg2 *iface)
{
SHDOCVW_LockModule();
return 2;
}
static ULONG WINAPI UrlHistoryStg_Release(IUrlHistoryStg2 *iface)
{
SHDOCVW_UnlockModule();
return 1;
}
......
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