From: Rémi Bernon <rbernon(a)codeweavers.com> It will later be freed in EnumSTATDATA_Release with HeapFree, and the copy code path may allocate the member with HeapAlloc. --- dlls/ole32/datacache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index e6cea25aca6..b3216992af5 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -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; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1956