gdi32/emf: Zero-initialize handles array (Valgrind).

It's checked in emr_reset(), and reallocation already zero-initializes new slots.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-03-24 21:42:14 +01:00 committed by Alexandre Julliard
parent de89f77727
commit 8dec8cc96c

View file

@ -2669,7 +2669,7 @@ static struct emf *emf_create( HDC hdc, const RECT *rect, const WCHAR *descripti
size = sizeof(ENHMETAHEADER) + aligned_size(length);
if (!(emf->emh = HeapAlloc( GetProcessHeap(), 0, size )) ||
!(emf->handles = HeapAlloc( GetProcessHeap(), 0,
!(emf->handles = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
HANDLE_LIST_INC * sizeof(emf->handles[0]) )))
{
HeapFree( GetProcessHeap(), 0, emf->emh );