mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
- Patch by hto: Do not wait until process is closed with process database locked. See Bug 3805.
svn path=/trunk/; revision=36948
This commit is contained in:
@@ -130,6 +130,7 @@ NTSTATUS STDCALL CsrFreeProcessData(HANDLE Pid)
|
||||
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 @@ NTSTATUS STDCALL CsrFreeProcessData(HANDLE Pid)
|
||||
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 @@ NTSTATUS STDCALL CsrFreeProcessData(HANDLE Pid)
|
||||
|
||||
RtlFreeHeap(CsrssApiHeap, 0, pProcessData);
|
||||
UNLOCK;
|
||||
if (Process)
|
||||
{
|
||||
NtClose(Process);
|
||||
}
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user