Author: jimtabor
Date: Sat Oct 25 10:33:02 2008
New Revision: 36948
URL:
http://svn.reactos.org/svn/reactos?rev=36948&view=rev
Log:
- Patch by hto: Do not wait until process is closed with process database locked. See Bug
3805.
Modified:
trunk/reactos/subsystems/win32/csrss/api/process.c
Modified: trunk/reactos/subsystems/win32/csrss/api/process.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/api…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/api/process.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/api/process.c [iso-8859-1] Sat Oct 25 10:33:02
2008
@@ -130,6 +130,7 @@
ULONG hash;
UINT c;
PCSRSS_PROCESS_DATA pProcessData, *pPrevLink;
+ HANDLE Process;
hash = ((ULONG_PTR)Pid >> 2) % (sizeof(ProcessData) / sizeof(*ProcessData));
pPrevLink = &ProcessData[hash];
@@ -144,10 +145,7 @@
if (pProcessData)
{
DPRINT("CsrFreeProcessData pid: %d\n", Pid);
- if (pProcessData->Process)
- {
- NtClose(pProcessData->Process);
- }
+ Process = pProcessData->Process;
if (pProcessData->HandleTable)
{
for (c = 0; c < pProcessData->HandleTableSize; c++)
@@ -177,6 +175,10 @@
RtlFreeHeap(CsrssApiHeap, 0, pProcessData);
UNLOCK;
+ if (Process)
+ {
+ NtClose(Process);
+ }
return STATUS_SUCCESS;
}