From c3659cd61194e9c68c5b56e526f025f3e01ef87f Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Fri, 11 Sep 2020 12:51:56 +0100 Subject: [PATCH] wpe: Plug SHM buffer leaks Fixes #1409 Part-of: --- ext/wpe/WPEThreadedView.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/wpe/WPEThreadedView.cpp b/ext/wpe/WPEThreadedView.cpp index 797751738f..de05e3c831 100644 --- a/ext/wpe/WPEThreadedView.cpp +++ b/ext/wpe/WPEThreadedView.cpp @@ -284,6 +284,14 @@ WPEView::~WPEView() gst_egl_image_unref(egl.committed); egl.committed = nullptr; } + if (shm.pending) { + gst_buffer_unref(shm.pending); + shm.pending = nullptr; + } + if (shm.committed) { + gst_buffer_unref(shm.committed); + shm.committed = nullptr; + } } WPEContextThread::singleton().dispatch([&]() {