fix ref count

This commit is contained in:
donnaskiez 2024-06-17 18:51:39 +10:00
parent 30fdeb2118
commit bbcfa50cff
2 changed files with 7 additions and 8 deletions

View file

@ -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;

View file

@ -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;