gdiplus: Use the correct memory allocation function for PropVariants.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e914629415
commit
2fdccc247e
|
@ -3065,7 +3065,7 @@ static BOOL get_bool_property(IWICMetadataReader *reader, const GUID *guid, cons
|
||||||
PropVariantInit(&value);
|
PropVariantInit(&value);
|
||||||
|
|
||||||
id.vt = VT_LPWSTR;
|
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;
|
if (!id.u.pwszVal) return FALSE;
|
||||||
lstrcpyW(id.u.pwszVal, prop_name);
|
lstrcpyW(id.u.pwszVal, prop_name);
|
||||||
hr = IWICMetadataReader_GetValue(reader, NULL, &id, &value);
|
hr = IWICMetadataReader_GetValue(reader, NULL, &id, &value);
|
||||||
|
@ -3092,7 +3092,7 @@ static PropertyItem *get_property(IWICMetadataReader *reader, const GUID *guid,
|
||||||
PropVariantInit(&value);
|
PropVariantInit(&value);
|
||||||
|
|
||||||
id.vt = VT_LPWSTR;
|
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;
|
if (!id.u.pwszVal) return NULL;
|
||||||
lstrcpyW(id.u.pwszVal, prop_name);
|
lstrcpyW(id.u.pwszVal, prop_name);
|
||||||
hr = IWICMetadataReader_GetValue(reader, NULL, &id, &value);
|
hr = IWICMetadataReader_GetValue(reader, NULL, &id, &value);
|
||||||
|
|
Loading…
Reference in New Issue