wpe: Plug SHM buffer leaks
authorPhilippe Normand <philn@igalia.com>
Fri, 11 Sep 2020 11:51:56 +0000 (12:51 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 21 Sep 2020 16:39:57 +0000 (16:39 +0000)
Fixes #1409

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1568>

ext/wpe/WPEThreadedView.cpp

index 7977517..de05e3c 100644 (file)
@@ -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([&]() {