user32: Use SecureZeroMemory to clear magic fields.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
Eric Pouech 2023-11-07 19:12:39 +01:00 committed by Alexandre Julliard
parent 0e967a5cec
commit 7562292cea

View file

@ -2113,7 +2113,8 @@ void WDML_RemoveConv(WDML_CONV* pRef, WDML_SIDE side)
{ {
pPrev->next = pCurrent->next; pPrev->next = pCurrent->next;
} }
pCurrent->magic = 0; /* Ensure compiler doesn't optimize out the assignment with 0. */
SecureZeroMemory(&pCurrent->magic, sizeof(pCurrent->magic));
HeapFree(GetProcessHeap(), 0, pCurrent); HeapFree(GetProcessHeap(), 0, pCurrent);
break; break;
} }