Skip to content

Commit fa43487

Browse files
authored
Merge pull request #34 from microsoft/robo/fix_handle_leak
fix: process handle leak
2 parents bc0ee89 + 6af8f93 commit fa43487

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/process.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ void GetProcessMemoryUsage(ProcessInfo process_info[1024], uint32_t* process_cou
5555
if (GetProcessMemoryInfo(hProcess, &pmc, sizeof(pmc))) {
5656
process_info[*process_count].memory = (DWORD)pmc.WorkingSetSize;
5757
}
58+
59+
CloseHandle(hProcess);
5860
}
5961

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

0 commit comments

Comments
 (0)