Commit 65bf359d authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msdmo: Remove a helper only used once.

parent e7548fc4
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <stdarg.h> #include <stdarg.h>
#define COBJMACROS
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winuser.h" #include "winuser.h"
...@@ -359,23 +361,6 @@ HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR name[]) ...@@ -359,23 +361,6 @@ HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR name[])
} }
/************************************************************************** /**************************************************************************
* IEnumDMOImpl_Destructor
*/
static BOOL IEnumDMOImpl_Destructor(IEnumDMOImpl* This)
{
TRACE("%p\n", This);
if (This->hkey)
RegCloseKey(This->hkey);
HeapFree(GetProcessHeap(), 0, This->pInTypes);
HeapFree(GetProcessHeap(), 0, This->pOutTypes);
return TRUE;
}
/**************************************************************************
* IEnumDMO_Constructor * IEnumDMO_Constructor
*/ */
static HRESULT IEnumDMO_Constructor( static HRESULT IEnumDMO_Constructor(
...@@ -450,10 +435,7 @@ static HRESULT IEnumDMO_Constructor( ...@@ -450,10 +435,7 @@ static HRESULT IEnumDMO_Constructor(
lerr: lerr:
if (FAILED(hr)) if (FAILED(hr))
{ IEnumDMO_Release(&lpedmo->IEnumDMO_iface);
IEnumDMOImpl_Destructor(lpedmo);
HeapFree(GetProcessHeap(), 0, lpedmo);
}
else else
{ {
TRACE("returning %p\n", lpedmo); TRACE("returning %p\n", lpedmo);
...@@ -489,7 +471,7 @@ static HRESULT WINAPI IEnumDMO_fnQueryInterface(IEnumDMO* iface, REFIID riid, vo ...@@ -489,7 +471,7 @@ static HRESULT WINAPI IEnumDMO_fnQueryInterface(IEnumDMO* iface, REFIID riid, vo
IsEqualIID(riid, &IID_IUnknown)) IsEqualIID(riid, &IID_IUnknown))
{ {
*ppvObj = iface; *ppvObj = iface;
IEnumDMO_fnAddRef(iface); IEnumDMO_AddRef(iface);
} }
return *ppvObj ? S_OK : E_NOINTERFACE; return *ppvObj ? S_OK : E_NOINTERFACE;
...@@ -507,8 +489,11 @@ static ULONG WINAPI IEnumDMO_fnRelease(IEnumDMO * iface) ...@@ -507,8 +489,11 @@ static ULONG WINAPI IEnumDMO_fnRelease(IEnumDMO * iface)
if (!refCount) if (!refCount)
{ {
IEnumDMOImpl_Destructor(This); if (This->hkey)
HeapFree(GetProcessHeap(),0,This); RegCloseKey(This->hkey);
HeapFree(GetProcessHeap(), 0, This->pInTypes);
HeapFree(GetProcessHeap(), 0, This->pOutTypes);
HeapFree(GetProcessHeap(), 0, This);
} }
return refCount; return refCount;
} }
......
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