mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[KERNEL32]
- do not access memory that might have been freed svn path=/trunk/; revision=53482
This commit is contained in:
parent
e95dd604c1
commit
d7548bc164
1 changed files with 6 additions and 2 deletions
|
@ -305,7 +305,8 @@ RemoveHandles(IN DWORD dwProcessId,
|
||||||
|
|
||||||
/* Loop all thread data events */
|
/* Loop all thread data events */
|
||||||
ThreadData = (PDBGSS_THREAD_DATA*)NtCurrentTeb()->DbgSsReserved;
|
ThreadData = (PDBGSS_THREAD_DATA*)NtCurrentTeb()->DbgSsReserved;
|
||||||
for (ThisData = *ThreadData; ThisData; ThisData = ThisData->Next)
|
ThisData = *ThreadData;
|
||||||
|
while(ThisData)
|
||||||
{
|
{
|
||||||
/* Check if this one matches */
|
/* Check if this one matches */
|
||||||
if ((ThisData->HandleMarked) &&
|
if ((ThisData->HandleMarked) &&
|
||||||
|
@ -326,6 +327,7 @@ RemoveHandles(IN DWORD dwProcessId,
|
||||||
/* Move to the next one */
|
/* Move to the next one */
|
||||||
ThreadData = &ThisData->Next;
|
ThreadData = &ThisData->Next;
|
||||||
}
|
}
|
||||||
|
ThisData = *ThreadData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,7 +340,8 @@ CloseAllProcessHandles(IN DWORD dwProcessId)
|
||||||
|
|
||||||
/* Loop all thread data events */
|
/* Loop all thread data events */
|
||||||
ThreadData = (PDBGSS_THREAD_DATA*)NtCurrentTeb()->DbgSsReserved;
|
ThreadData = (PDBGSS_THREAD_DATA*)NtCurrentTeb()->DbgSsReserved;
|
||||||
for (ThisData = *ThreadData; ThisData; ThisData = ThisData->Next)
|
ThisData = *ThreadData;
|
||||||
|
while(ThisData)
|
||||||
{
|
{
|
||||||
/* Check if this one matches */
|
/* Check if this one matches */
|
||||||
if (ThisData->ProcessId == dwProcessId)
|
if (ThisData->ProcessId == dwProcessId)
|
||||||
|
@ -358,6 +361,7 @@ CloseAllProcessHandles(IN DWORD dwProcessId)
|
||||||
/* Move to the next one */
|
/* Move to the next one */
|
||||||
ThreadData = &ThisData->Next;
|
ThreadData = &ThisData->Next;
|
||||||
}
|
}
|
||||||
|
ThisData = *ThreadData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue