mirror of
https://github.com/donnaskiez/ac.git
synced 2024-11-21 22:24:08 +01:00
fix ref count
This commit is contained in:
parent
30fdeb2118
commit
bbcfa50cff
2 changed files with 7 additions and 8 deletions
|
@ -404,7 +404,7 @@ EnumerateProcessModuleList(_In_ HANDLE ProcessId,
|
|||
_In_ PROCESS_MODULE_CALLBACK Callback,
|
||||
_In_opt_ PVOID Context)
|
||||
{
|
||||
UINT32 index = 0;
|
||||
INT32 index = 0;
|
||||
PRTL_HASHMAP map = GetProcessHashmap();
|
||||
BOOLEAN ret = FALSE;
|
||||
PPROCESS_LIST_ENTRY entry = NULL;
|
||||
|
@ -721,6 +721,8 @@ ThreadCreateNotifyRoutine(_In_ HANDLE ProcessId,
|
|||
ImpPsLookupThreadByThreadId(ThreadId, &thread);
|
||||
ImpPsLookupProcessByProcessId(ProcessId, &process);
|
||||
|
||||
/* ideally we should dereference the other but this shouldnt really ever
|
||||
* fail */
|
||||
if (!thread || !process)
|
||||
return;
|
||||
|
||||
|
@ -732,9 +734,6 @@ ThreadCreateNotifyRoutine(_In_ HANDLE ProcessId,
|
|||
if (!entry)
|
||||
goto end;
|
||||
|
||||
ImpObfReferenceObject(thread);
|
||||
ImpObfReferenceObject(process);
|
||||
|
||||
entry->thread_id = ThreadId;
|
||||
entry->thread = thread;
|
||||
entry->owning_process = process;
|
||||
|
|
|
@ -552,7 +552,7 @@ RtlpRbTreeTransplant(_In_ PRB_TREE Tree,
|
|||
}
|
||||
|
||||
STATIC
|
||||
PVOID
|
||||
PRB_TREE_NODE
|
||||
RtlpRbTreeFindNode(_In_ PRB_TREE Tree, _In_ PVOID Key)
|
||||
{
|
||||
INT32 result = 0;
|
||||
|
|
Loading…
Reference in a new issue