Sebastian Lackner : gdiplus: Use the correct memory allocation function for PropVariants.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Oct 28 10:16:14 CDT 2015
Module: wine
Branch: master
Commit: 2fdccc247e7ad136f30f8cabcb0fc1143ab37bf3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2fdccc247e7ad136f30f8cabcb0fc1143ab37bf3
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Wed Oct 21 00:52:51 2015 +0200
gdiplus: Use the correct memory allocation function for PropVariants.
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 6725de8..1cef100 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);
More information about the wine-cvs
mailing list