mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +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:
parent
6d2f6893bc
commit
bb641e28cb
1 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue