From 7ad84674abb71a6731f4bf210f3140cd6802331d Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Thu, 6 Apr 2023 07:58:03 +0200 Subject: [PATCH] gst-plugins-base: gl: wayland: cleanup on close The proxy and queue are created in the gst_gl_window_wayland_egl_open() function and will be recreated on open. This leaks both objects, the wayland client documentation mentions that they should be destroyed using the appropriate destroy functions. Found during valgrind memory leak testing, these blocks were marked as definitely lost. Part-of: --- .../gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c index f2d7ceb4e1..440b6354b3 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c @@ -478,6 +478,9 @@ gst_gl_window_wayland_egl_close (GstGLWindow * gl_window) g_source_unref (window_egl->wl_source); window_egl->wl_source = NULL; + wl_proxy_wrapper_destroy (window_egl->display.display); + wl_event_queue_destroy (window_egl->window.queue); + GST_GL_WINDOW_CLASS (parent_class)->close (gl_window); }