Author: fireball
Date: Sat Jan 3 07:23:44 2009
New Revision: 38531
URL:
http://svn.reactos.org/svn/reactos?rev=38531&view=rev
Log:
- Don't leak a FileObject reference in case of failure.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] Sat Jan 3 07:23:44 2009
@@ -1148,7 +1148,11 @@
PreviousMode,
(PVOID *)&Event,
NULL);
- if (Status != STATUS_SUCCESS) return Status;
+ if (Status != STATUS_SUCCESS)
+ {
+ ObDereferenceObject(FileObject);
+ return Status;
+ }
KeClearEvent(Event);
}