Marcus Meissner : ntoskrnl.exe: Check irp for NULL consistently.

Alexandre Julliard julliard at winehq.org
Fri Oct 31 09:23:59 CDT 2008


Module: wine
Branch: master
Commit: 28e990c13da41f5f9fffa9778c8e1560529ee950
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=28e990c13da41f5f9fffa9778c8e1560529ee950

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Thu Oct 30 21:56:59 2008 +0100

ntoskrnl.exe: Check irp for NULL consistently.

---

 dlls/ntoskrnl.exe/ntoskrnl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index c37b1f8..e4b0ea5 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -290,12 +290,12 @@ PIRP WINAPI IoAllocateIrp( CCHAR stack_size, BOOLEAN charge_quota )
 
     size = sizeof(IRP) + stack_size * sizeof(IO_STACK_LOCATION);
     irp = ExAllocatePool( NonPagedPool, size );
-    if (irp != NULL)
-        IoInitializeIrp( irp, size, stack_size );
+    if (irp == NULL)
+        return NULL;
+    IoInitializeIrp( irp, size, stack_size );
     irp->AllocationFlags = IRP_ALLOCATED_FIXED_SIZE;
     if (charge_quota)
         irp->AllocationFlags |= IRP_LOOKASIDE_ALLOCATION;
-
     return irp;
 }
 




More information about the wine-cvs mailing list