Author: aandrejevic
Date: Tue May 6 22:17:26 2014
New Revision: 63182
URL:
http://svn.reactos.org/svn/reactos?rev=63182&view=rev
Log:
[BASESRV]
Don't set the process handle in BaseSrvCheckVDM.
Close the process handle when removing the console record.
Modified:
trunk/reactos/subsystems/win/basesrv/vdm.c
Modified: trunk/reactos/subsystems/win/basesrv/vdm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win/basesrv/vdm…
==============================================================================
--- trunk/reactos/subsystems/win/basesrv/vdm.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win/basesrv/vdm.c [iso-8859-1] Tue May 6 22:17:26 2014
@@ -268,6 +268,9 @@
ConsoleRecord->CurrentDirs = NULL;
ConsoleRecord->CurDirsLength = 0;
}
+
+ /* Close the process handle */
+ if (ConsoleRecord->ProcessHandle)
NtClose(ConsoleRecord->ProcessHandle);
/* Close the event handle */
if (ConsoleRecord->ServerEvent) NtClose(ConsoleRecord->ServerEvent);
@@ -613,7 +616,7 @@
/* Initialize the console record */
ConsoleRecord->ConsoleHandle = CheckVdmRequest->ConsoleHandle;
- ConsoleRecord->ProcessHandle =
CsrGetClientThread()->Process->ProcessHandle;
+ ConsoleRecord->ProcessHandle = NULL;
ConsoleRecord->ServerEvent = ConsoleRecord->ClientEvent = NULL;
ConsoleRecord->ReenterCount = 0;
ConsoleRecord->CurrentDirs = NULL;
@@ -779,6 +782,7 @@
*/
if (ConsoleRecord->DosListHead.Flink ==
&ConsoleRecord->DosListHead)
{
+ if (ConsoleRecord->ProcessHandle)
NtClose(ConsoleRecord->ProcessHandle);
if (ConsoleRecord->ServerEvent)
NtClose(ConsoleRecord->ServerEvent);
RemoveEntryList(&ConsoleRecord->Entry);
RtlFreeHeap(BaseSrvHeap, 0, ConsoleRecord);