[ros-diffs] [dchapyshev] 41414: - Add target process reference/dereference in ProcessLdtInformation/ProcessWorkingSetWatch/ProcessWx86Information cases of NtQueryInformationProcess.

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Mon Jun 15 09:05:20 CEST 2009


Author: dchapyshev
Date: Mon Jun 15 11:05:19 2009
New Revision: 41414

URL: http://svn.reactos.org/svn/reactos?rev=41414&view=rev
Log:
- Add target process reference/dereference in ProcessLdtInformation/ProcessWorkingSetWatch/ProcessWx86Information cases of NtQueryInformationProcess.

Modified:
    trunk/reactos/ntoskrnl/ps/query.c

Modified: trunk/reactos/ntoskrnl/ps/query.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=41414&r1=41413&r2=41414&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] Mon Jun 15 11:05:19 2009
@@ -304,7 +304,20 @@
         case ProcessLdtInformation:
         case ProcessWorkingSetWatch:
         case ProcessWx86Information:
+
+            /* Reference the process */
+            Status = ObReferenceObjectByHandle(ProcessHandle,
+                                               PROCESS_QUERY_INFORMATION,
+                                               PsProcessType,
+                                               PreviousMode,
+                                               (PVOID*)&Process,
+                                               NULL);
+            if (!NT_SUCCESS(Status)) break;
+
             DPRINT1("Not implemented: %lx\n", ProcessInformationClass);
+
+            /* Dereference the process */
+            ObDereferenceObject(Process);
             Status = STATUS_NOT_IMPLEMENTED;
             break;
 



More information about the Ros-diffs mailing list