From 523c60c5d5f7ead6045a3709797271bb6245e8d0 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sun, 15 May 2005 13:59:57 +0000 Subject: [PATCH] Don't push an already freed irp to the list (in IoFreeIrp). svn path=/trunk/; revision=15311 --- reactos/ntoskrnl/io/irp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/irp.c b/reactos/ntoskrnl/io/irp.c index 5b0fbc932d7..71b748efaf4 100644 --- a/reactos/ntoskrnl/io/irp.c +++ b/reactos/ntoskrnl/io/irp.c @@ -1282,11 +1282,15 @@ IoFreeIrp(PIRP Irp) /* All lists failed, use the pool */ List->L.FreeMisses++; ExFreePool(Irp); + Irp = NULL; } } /* The free was within dhe Depth */ - InterlockedPushEntrySList(&List->L.ListHead, (PSINGLE_LIST_ENTRY)Irp); + if (Irp) + { + InterlockedPushEntrySList(&List->L.ListHead, (PSINGLE_LIST_ENTRY)Irp); + } } DPRINT("Free done\n");