From 726c5df58feb0e3e579b9eb5ec8bedbe2bc53fe2 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Thu, 2 Nov 2023 21:20:15 -0600 Subject: [PATCH] devenum: Use CRT allocation functions. --- dlls/devenum/createdevenum.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/devenum/createdevenum.c b/dlls/devenum/createdevenum.c index 30bbf483b21..bc91b235804 100644 --- a/dlls/devenum/createdevenum.c +++ b/dlls/devenum/createdevenum.c @@ -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, -- 2.11.4.GIT