mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
Eliminate memory leak in Win32NetState
This commit is contained in:
parent
c02c9c3c24
commit
5470a3a453
5 changed files with 19 additions and 12 deletions
|
@ -19,21 +19,18 @@ class CNetworkListManagerEvent : public INetworkListManagerEvents
|
|||
{
|
||||
public:
|
||||
CNetworkListManagerEvent() : m_ref(1) { }
|
||||
~CNetworkListManagerEvent() { }
|
||||
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject)
|
||||
{
|
||||
HRESULT Result = S_OK;
|
||||
if (IsEqualIID(riid, IID_IUnknown)) {
|
||||
*ppvObject = (IUnknown *)this;
|
||||
} else if (IsEqualIID(riid ,IID_INetworkListManagerEvents)) {
|
||||
*ppvObject = (INetworkListManagerEvents *)this;
|
||||
} else {
|
||||
Result = E_NOINTERFACE;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
AddRef();
|
||||
|
||||
return Result;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ULONG STDMETHODCALLTYPE AddRef()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue