[WIN32SS:ENG] Zero memory when allocating GRAPHICS_DEVICE structures

This commit is contained in:
Hervé Poussineau 2022-11-10 22:06:11 +01:00
parent ea30b96334
commit 3d01a103d7

View file

@ -465,9 +465,9 @@ EngpRegisterGraphicsDevice(
TRACE("EngpRegisterGraphicsDevice(%wZ)\n", pustrDeviceName);
/* Allocate a GRAPHICS_DEVICE structure */
pGraphicsDevice = ExAllocatePoolWithTag(PagedPool,
sizeof(GRAPHICS_DEVICE),
GDITAG_GDEVICE);
pGraphicsDevice = ExAllocatePoolZero(PagedPool,
sizeof(GRAPHICS_DEVICE),
GDITAG_GDEVICE);
if (!pGraphicsDevice)
{
ERR("ExAllocatePoolWithTag failed\n");
@ -563,15 +563,6 @@ EngpRegisterGraphicsDevice(
pustrDescription->Length);
pGraphicsDevice->pwszDescription[pustrDescription->Length/sizeof(WCHAR)] = 0;
/* Initialize the pdevmodeInfo list */
pGraphicsDevice->pdevmodeInfo = NULL;
// FIXME: initialize state flags
pGraphicsDevice->StateFlags = 0;
/* Create the mode list */
pGraphicsDevice->pDevModeList = NULL;
/* Lock loader */
EngAcquireSemaphore(ghsemGraphicsDeviceList);