[ros-diffs] [cgutman] 56065: [NTOSKRNL] - Fix a major device object reference leak (1 per PnP IRP)

cgutman at svn.reactos.org cgutman at svn.reactos.org
Tue Mar 6 21:58:29 UTC 2012


Author: cgutman
Date: Tue Mar  6 21:58:29 2012
New Revision: 56065

URL: http://svn.reactos.org/svn/reactos?rev=56065&view=rev
Log:
[NTOSKRNL]
- Fix a major device object reference leak (1 per PnP IRP)

Modified:
    trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c

Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c?rev=56065&r1=56064&r2=56065&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Tue Mar  6 21:58:29 2012
@@ -1281,7 +1281,10 @@
                               NULL);
         Status = IoStatusBlock.Status;
     }
-    
+
+    /* Remove the reference */
+    ObDereferenceObject(TopDeviceObject);
+
     /* Return the information */
     *Information = (PVOID)IoStatusBlock.Information;
     return Status;




More information about the Ros-diffs mailing list