]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
win32: close pi.hThread as required by Windows API (#2208)
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Tue, 9 Sep 2025 18:41:17 +0000 (18:41 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 9 Sep 2025 23:26:36 +0000 (23:26 +0000)
Previously, a leak would occur due to an unclosed pi.hThread.

src/ipc_win32.cc

index 4047e4ca504c7eee2326989ee95424e778af6b65..7d64e65fdb84b898f96f90c95f9f8fae4c5e208b 100644 (file)
@@ -573,6 +573,7 @@ ipc_thread_1(void *in_params)
                       nullptr, nullptr, &si, &pi)) {
         pid = pi.dwProcessId;
         hProcess = pi.hProcess;
+        CloseHandle(pi.hThread);
     } else {
         pid = -1;
         x = GetLastError();