mirror of
https://github.com/reactos/reactos.git
synced 2025-05-03 21:00:15 +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 */
|
/* Make sure we have a valid CPU count */
|
||||||
if (!Count) return STATUS_INVALID_PARAMETER;
|
if (!Count) return STATUS_INVALID_PARAMETER;
|
||||||
|
|
||||||
/* Allocate the array of I/O Interrupts */
|
/* Allocate the array of I/O interrupts */
|
||||||
IoInterrupt = ExAllocatePoolWithTag(NonPagedPool,
|
IoInterrupt = ExAllocatePoolZero(NonPagedPool,
|
||||||
(Count - 1) * sizeof(KINTERRUPT) +
|
(Count - 1) * sizeof(KINTERRUPT) +
|
||||||
sizeof(IO_INTERRUPT),
|
sizeof(IO_INTERRUPT),
|
||||||
TAG_KINTERRUPT);
|
TAG_KINTERRUPT);
|
||||||
if (!IoInterrupt) return STATUS_INSUFFICIENT_RESOURCES;
|
if (!IoInterrupt) return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
/* Select which Spinlock to use */
|
/* Select which Spinlock to use */
|
||||||
|
@ -72,9 +72,6 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
||||||
Interrupt = (PKINTERRUPT)(IoInterrupt + 1);
|
Interrupt = (PKINTERRUPT)(IoInterrupt + 1);
|
||||||
FirstRun = TRUE;
|
FirstRun = TRUE;
|
||||||
|
|
||||||
/* Start with a fresh structure */
|
|
||||||
RtlZeroMemory(IoInterrupt, sizeof(IO_INTERRUPT));
|
|
||||||
|
|
||||||
/* Now create all the interrupts */
|
/* Now create all the interrupts */
|
||||||
Affinity = ProcessorEnableMask & KeActiveProcessors;
|
Affinity = ProcessorEnableMask & KeActiveProcessors;
|
||||||
for (Count = 0; Affinity; Count++, Affinity >>= 1)
|
for (Count = 0; Affinity; Count++, Affinity >>= 1)
|
||||||
|
|
Loading…
Reference in a new issue