mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 05:54:05 +00:00
[WIN32SS:ENG] Zero memory when allocating GRAPHICS_DEVICE structures
This commit is contained in:
parent
ea30b96334
commit
3d01a103d7
|
@ -465,9 +465,9 @@ EngpRegisterGraphicsDevice(
|
||||||
TRACE("EngpRegisterGraphicsDevice(%wZ)\n", pustrDeviceName);
|
TRACE("EngpRegisterGraphicsDevice(%wZ)\n", pustrDeviceName);
|
||||||
|
|
||||||
/* Allocate a GRAPHICS_DEVICE structure */
|
/* Allocate a GRAPHICS_DEVICE structure */
|
||||||
pGraphicsDevice = ExAllocatePoolWithTag(PagedPool,
|
pGraphicsDevice = ExAllocatePoolZero(PagedPool,
|
||||||
sizeof(GRAPHICS_DEVICE),
|
sizeof(GRAPHICS_DEVICE),
|
||||||
GDITAG_GDEVICE);
|
GDITAG_GDEVICE);
|
||||||
if (!pGraphicsDevice)
|
if (!pGraphicsDevice)
|
||||||
{
|
{
|
||||||
ERR("ExAllocatePoolWithTag failed\n");
|
ERR("ExAllocatePoolWithTag failed\n");
|
||||||
|
@ -563,15 +563,6 @@ EngpRegisterGraphicsDevice(
|
||||||
pustrDescription->Length);
|
pustrDescription->Length);
|
||||||
pGraphicsDevice->pwszDescription[pustrDescription->Length/sizeof(WCHAR)] = 0;
|
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 */
|
/* Lock loader */
|
||||||
EngAcquireSemaphore(ghsemGraphicsDeviceList);
|
EngAcquireSemaphore(ghsemGraphicsDeviceList);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue