Skip to content

Commit

Permalink
fix: process handle leak
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 committed Oct 13, 2021
1 parent bc0ee89 commit 6af8f93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ void GetProcessMemoryUsage(ProcessInfo process_info[1024], uint32_t* process_cou
if (GetProcessMemoryInfo(hProcess, &pmc, sizeof(pmc))) {
process_info[*process_count].memory = (DWORD)pmc.WorkingSetSize;
}

CloseHandle(hProcess);
}

// Per documentation, it is not recommended to add or subtract values from the FILETIME
Expand Down

0 comments on commit 6af8f93

Please sign in to comment.