Commit 726c5df5 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

devenum: Use CRT allocation functions.

parent d0153cf3
......@@ -29,7 +29,6 @@
#include "dsound.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "mmddk.h"
#include "initguid.h"
......@@ -87,7 +86,7 @@ static HRESULT register_codec(const GUID *class, const WCHAR *name,
if (FAILED(hr))
return hr;
if (!(buffer = heap_alloc((wcslen(L"@device:cm:") + CHARS_IN_GUID + wcslen(name) + 1) * sizeof(WCHAR))))
if (!(buffer = malloc((wcslen(L"@device:cm:") + CHARS_IN_GUID + wcslen(name) + 1) * sizeof(WCHAR))))
{
IParseDisplayName_Release(parser);
return E_OUTOFMEMORY;
......@@ -100,7 +99,7 @@ static HRESULT register_codec(const GUID *class, const WCHAR *name,
IParseDisplayName_ParseDisplayName(parser, NULL, buffer, &eaten, &mon);
IParseDisplayName_Release(parser);
heap_free(buffer);
free(buffer);
IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&propbag);
IMoniker_Release(mon);
......@@ -428,7 +427,7 @@ static void register_legacy_filters(void)
len = 0;
if (!RegQueryValueExW(classkey, NULL, NULL, &Type, NULL, &len))
{
WCHAR *friendlyname = heap_alloc(len);
WCHAR *friendlyname = malloc(len);
if (!friendlyname)
{
RegCloseKey(classkey);
......@@ -439,7 +438,7 @@ static void register_legacy_filters(void)
hr = register_codec(&CLSID_LegacyAmFilterCategory, wszFilterSubkeyName,
&clsid, friendlyname, &prop_bag);
heap_free(friendlyname);
free(friendlyname);
}
else
hr = register_codec(&CLSID_LegacyAmFilterCategory, wszFilterSubkeyName,
......@@ -482,7 +481,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
if (guid)
{
WCHAR *name = heap_alloc(sizeof(defaultW) + wcslen(desc) * sizeof(WCHAR));
WCHAR *name = malloc(sizeof(defaultW) + wcslen(desc) * sizeof(WCHAR));
if (!name)
return FALSE;
wcscpy(name, L"DirectSound: ");
......@@ -490,7 +489,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
hr = register_codec(&CLSID_AudioRendererCategory, name,
&CLSID_DSoundRender, name, &prop_bag);
heap_free(name);
free(name);
}
else
hr = register_codec(&CLSID_AudioRendererCategory, defaultW,
......
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