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([&]() {