ole32: Fix a memory leak of moniker in RunningObjectTableImpl_Register.

This commit is contained in:
Rob Shearman 2007-11-10 16:05:51 +00:00 committed by Alexandre Julliard
parent 3bd222004e
commit 5885be4e11

View File

@ -544,6 +544,7 @@ RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD grfFlags,
IMoniker_Release(pmkObjectName);
if (hr != S_OK)
{
HeapFree(GetProcessHeap(), 0, moniker);
rot_entry_delete(rot_entry);
return hr;
}
@ -567,6 +568,7 @@ RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD grfFlags,
}
break;
}
HeapFree(GetProcessHeap(), 0, moniker);
if (FAILED(hr))
{
rot_entry_delete(rot_entry);