[NTOS]: Don't hardcode the size of the ShutDownWaitEntry and use the correct pool tags when freeing the entry.

svn path=/trunk/; revision=66866
This commit is contained in:
Hermès Bélusca-Maïto 2015-03-24 00:19:43 +00:00
parent 4f573a59dc
commit 79243bfdce

View file

@ -57,7 +57,7 @@ PoRequestShutdownWait(
PAGED_CODE(); PAGED_CODE();
/* Allocate a new shutdown wait entry */ /* Allocate a new shutdown wait entry */
ShutDownWaitEntry = ExAllocatePoolWithTag(PagedPool, 8u, 'LSoP'); ShutDownWaitEntry = ExAllocatePoolWithTag(PagedPool, sizeof(*ShutDownWaitEntry), 'LSoP');
if (ShutDownWaitEntry == NULL) if (ShutDownWaitEntry == NULL)
{ {
return STATUS_NO_MEMORY; return STATUS_NO_MEMORY;
@ -84,7 +84,7 @@ PoRequestShutdownWait(
{ {
/* We cannot proceed, cleanup and return failure */ /* We cannot proceed, cleanup and return failure */
ObDereferenceObject(Thread); ObDereferenceObject(Thread);
ExFreePoolWithTag(ShutDownWaitEntry, 0); ExFreePoolWithTag(ShutDownWaitEntry, 'LSoP');
Status = STATUS_UNSUCCESSFUL; Status = STATUS_UNSUCCESSFUL;
} }
@ -138,7 +138,7 @@ PopProcessShutDownLists(VOID)
ObfDereferenceObject(ShutDownWaitEntry->Thread); ObfDereferenceObject(ShutDownWaitEntry->Thread);
/* Finally free the entry */ /* Finally free the entry */
ExFreePoolWithTag(ShutDownWaitEntry, 0); ExFreePoolWithTag(ShutDownWaitEntry, 'LSoP');
} }
} }