Module: wine Branch: master Commit: 28e990c13da41f5f9fffa9778c8e1560529ee950 URL: http://source.winehq.org/git/wine.git/?a=commit;h=28e990c13da41f5f9fffa9778c...
Author: Marcus Meissner marcus@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; }