[ros-diffs] [fireball] 31602: - Fix possible handle leak. See issue #2934 for more details.

fireball at svn.reactos.org fireball at svn.reactos.org
Sat Jan 5 11:01:36 CET 2008


Author: fireball
Date: Sat Jan  5 13:01:34 2008
New Revision: 31602

URL: http://svn.reactos.org/svn/reactos?rev=31602&view=rev
Log:
- Fix possible handle leak.
See issue #2934 for more details.

Modified:
    trunk/reactos/ntoskrnl/io/iomgr/device.c

Modified: trunk/reactos/ntoskrnl/io/iomgr/device.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/device.c?rev=31602&r1=31601&r2=31602&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/device.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/device.c Sat Jan  5 13:01:34 2008
@@ -171,10 +171,11 @@
         /* Return the requested data */
         *DeviceObject = IoGetRelatedDeviceObject(LocalFileObject);
         *FileObject = LocalFileObject;
-        ZwClose(FileHandle);
     }
 
     /* Close the handle */
+    ZwClose(FileHandle);
+
     return Status;
 }
 




More information about the Ros-diffs mailing list