[1/4] gdiplus: Use the correct memory allocation function for PropVariants.
Sebastian Lackner
sebastian at fds-team.de
Tue Oct 20 17:52:51 CDT 2015
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---
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 0a8027a..06cf633 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);
--
2.6.1
More information about the wine-patches
mailing list