gl: wayland: fix memory leak when do egl_close

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5219>
This commit is contained in:
Hou Qi 2023-08-22 10:58:18 +09:00 committed by GStreamer Marge Bot
parent fd720fbf64
commit 93e1bc94ae

View file

@ -478,6 +478,24 @@ gst_gl_window_wayland_egl_close (GstGLWindow * gl_window)
g_source_unref (window_egl->wl_source);
window_egl->wl_source = NULL;
if (window_egl->display.registry)
wl_registry_destroy (window_egl->display.registry);
if (window_egl->display.compositor)
wl_compositor_destroy (window_egl->display.compositor);
if (window_egl->display.subcompositor)
wl_subcompositor_destroy (window_egl->display.subcompositor);
if (window_egl->display.xdg_wm_base)
xdg_wm_base_destroy (window_egl->display.xdg_wm_base);
if (window_egl->display.shell)
wl_shell_destroy (window_egl->display.shell);
if (window_egl->display.seat)
wl_seat_destroy (window_egl->display.seat);
wl_proxy_wrapper_destroy (window_egl->display.display);
wl_event_queue_destroy (window_egl->window.queue);