mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 00:20:34 +00:00
[NTOS:IO] IoConnectInterrupt(): Zero-out the allocated structure at the correct place (#6503)
Addendum to commit d1258e99f
(r16229).
This commit is contained in:
parent
35d46b23f1
commit
603fd832d0
1 changed files with 5 additions and 8 deletions
|
@ -57,11 +57,11 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
|||
/* Make sure we have a valid CPU count */
|
||||
if (!Count) return STATUS_INVALID_PARAMETER;
|
||||
|
||||
/* Allocate the array of I/O Interrupts */
|
||||
IoInterrupt = ExAllocatePoolWithTag(NonPagedPool,
|
||||
(Count - 1) * sizeof(KINTERRUPT) +
|
||||
sizeof(IO_INTERRUPT),
|
||||
TAG_KINTERRUPT);
|
||||
/* Allocate the array of I/O interrupts */
|
||||
IoInterrupt = ExAllocatePoolZero(NonPagedPool,
|
||||
(Count - 1) * sizeof(KINTERRUPT) +
|
||||
sizeof(IO_INTERRUPT),
|
||||
TAG_KINTERRUPT);
|
||||
if (!IoInterrupt) return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
||||
/* Select which Spinlock to use */
|
||||
|
@ -72,9 +72,6 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
|||
Interrupt = (PKINTERRUPT)(IoInterrupt + 1);
|
||||
FirstRun = TRUE;
|
||||
|
||||
/* Start with a fresh structure */
|
||||
RtlZeroMemory(IoInterrupt, sizeof(IO_INTERRUPT));
|
||||
|
||||
/* Now create all the interrupts */
|
||||
Affinity = ProcessorEnableMask & KeActiveProcessors;
|
||||
for (Count = 0; Affinity; Count++, Affinity >>= 1)
|
||||
|
|
Loading…
Reference in a new issue