From f058eda798672f30c3a6853badced5047ea9bef3 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Wed, 23 Aug 2023 18:07:31 +0900 Subject: [PATCH] win32ipc: Fix pipe handle leak Named pipe handle must be closed if it's no longer needed Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2923 Part-of: --- .../sys/win32ipc/protocol/win32ipcpipeserver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcpipeserver.cpp b/subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcpipeserver.cpp index 5d1f0ad42a..c7629853de 100644 --- a/subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcpipeserver.cpp +++ b/subprojects/gst-plugins-bad/sys/win32ipc/protocol/win32ipcpipeserver.cpp @@ -464,6 +464,9 @@ out: self->conn.clear (); + if (pipe != INVALID_HANDLE_VALUE) + CloseHandle (pipe); + lk.lock (); CloseHandle (overlap.hEvent); self->last_err = ERROR_OPERATION_ABORTED;