From 441e2df29336e1e242d9e24887c1147587268717 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sat, 4 Sep 2021 10:43:59 +0000 Subject: [PATCH] Bug 1729082 - Stop leaking the portal Pipewire file descriptor, r=emilio It is used to create the `pw_core` object that is disconnected above. Differential Revision: https://phabricator.services.mozilla.com/D124508 --- .../modules/desktop_capture/linux/base_capturer_pipewire.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc b/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc index 7a88d06139e3..76f9e8ca1e87 100644 --- a/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc +++ b/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc @@ -238,6 +238,10 @@ BaseCapturerPipeWire::~BaseCapturerPipeWire() { g_object_unref(proxy_); proxy_ = nullptr; } + + if (pw_fd_ != -1) { + close(pw_fd_); + } } void BaseCapturerPipeWire::InitPortal() {