From 2fdccc247e7ad136f30f8cabcb0fc1143ab37bf3 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 21 Oct 2015 00:52:51 +0200 Subject: [PATCH] gdiplus: Use the correct memory allocation function for PropVariants. Signed-off-by: Sebastian Lackner Signed-off-by: Dmitry Timoshkov Signed-off-by: Vincent Povirk Signed-off-by: Alexandre Julliard --- dlls/gdiplus/image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 6725de8c39d..1cef100f083 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -3065,7 +3065,7 @@ static BOOL get_bool_property(IWICMetadataReader *reader, const GUID *guid, cons PropVariantInit(&value); id.vt = VT_LPWSTR; - id.u.pwszVal = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(prop_name) + 1) * sizeof(WCHAR)); + id.u.pwszVal = CoTaskMemAlloc((lstrlenW(prop_name) + 1) * sizeof(WCHAR)); if (!id.u.pwszVal) return FALSE; lstrcpyW(id.u.pwszVal, prop_name); hr = IWICMetadataReader_GetValue(reader, NULL, &id, &value); @@ -3092,7 +3092,7 @@ static PropertyItem *get_property(IWICMetadataReader *reader, const GUID *guid, PropVariantInit(&value); id.vt = VT_LPWSTR; - id.u.pwszVal = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(prop_name) + 1) * sizeof(WCHAR)); + id.u.pwszVal = CoTaskMemAlloc((lstrlenW(prop_name) + 1) * sizeof(WCHAR)); if (!id.u.pwszVal) return NULL; lstrcpyW(id.u.pwszVal, prop_name); hr = IWICMetadataReader_GetValue(reader, NULL, &id, &value);