Commit 4d608740 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

windows.media.devices: Use CRT allocation functions.

parent 0f44b3bd
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "winbase.h" #include "winbase.h"
#include "winstring.h" #include "winstring.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h"
#include "objbase.h" #include "objbase.h"
#include "activation.h" #include "activation.h"
...@@ -193,7 +192,7 @@ static HRESULT get_default_device_id(EDataFlow direction, AudioDeviceRole role, ...@@ -193,7 +192,7 @@ static HRESULT get_default_device_id(EDataFlow direction, AudioDeviceRole role,
return hr; return hr;
} }
s = heap_alloc((sizeof(id_fmt_pre) - sizeof(WCHAR)) + s = malloc((sizeof(id_fmt_pre) - sizeof(WCHAR)) +
(sizeof(id_fmt_hash) - sizeof(WCHAR)) + (sizeof(id_fmt_hash) - sizeof(WCHAR)) +
(wcslen(devid) + GUID_STR_LEN + 1 /* nul */) * sizeof(WCHAR)); (wcslen(devid) + GUID_STR_LEN + 1 /* nul */) * sizeof(WCHAR));
...@@ -210,7 +209,7 @@ static HRESULT get_default_device_id(EDataFlow direction, AudioDeviceRole role, ...@@ -210,7 +209,7 @@ static HRESULT get_default_device_id(EDataFlow direction, AudioDeviceRole role,
if (FAILED(hr)) if (FAILED(hr))
WARN("WindowsCreateString failed: %08lx\n", hr); WARN("WindowsCreateString failed: %08lx\n", hr);
heap_free(s); free(s);
CoTaskMemFree(devid); CoTaskMemFree(devid);
IMMDevice_Release(dev); IMMDevice_Release(dev);
......
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