Commit 85fdc7d6 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

ole32: Allocate IEnumSTATDATA data with the process heap.

It will later be freed in EnumSTATDATA_Release with HeapFree, and the copy code path may allocate the member with HeapAlloc.
parent af43e728
......@@ -2527,7 +2527,7 @@ static HRESULT WINAPI DataCache_EnumCache(IOleCache2 *iface,
count++;
}
data = CoTaskMemAlloc( count * sizeof(*data) );
data = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*data) );
if (!data) return E_OUTOFMEMORY;
LIST_FOR_EACH_ENTRY( cache_entry, &This->cache_list, DataCacheEntry, entry )
......@@ -2559,7 +2559,7 @@ static HRESULT WINAPI DataCache_EnumCache(IOleCache2 *iface,
fail:
while (i--) CoTaskMemFree( data[i].formatetc.ptd );
CoTaskMemFree( data );
HeapFree( GetProcessHeap(), 0, data );
return hr;
}
......
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