From 48097a4bb422299c0cb376ef682df1a548cc5f59 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 13 May 2005 20:05:37 +0000 Subject: [PATCH] close the snapshot handle --- src/os/win32/win32_sigar.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index aa46c256..44759e49 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -1317,6 +1317,7 @@ static int sigar_proc_modules_get_toolhelp(sigar_t *sigar, module.dwSize = sizeof(MODULEENTRY32); if (!module_first(snap_shot, &module)) { + CloseHandle(snap_shot); return SIGAR_OK; } @@ -1334,6 +1335,7 @@ static int sigar_proc_modules_get_toolhelp(sigar_t *sigar, module.dwSize = sizeof(MODULEENTRY32); } while (module_next(snap_shot, &module)); + CloseHandle(snap_shot); FreeLibrary(k32_handle); return SIGAR_OK;