From d937a7e899755bb3744eb60fbc7d5db3a355cfd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 11 Jul 2013 21:17:42 +0200 Subject: [PATCH] [741/906] wayland: Don't leak main context and loop --- gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c index 1dd8112aaa..36068e0fb8 100644 --- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c @@ -215,6 +215,13 @@ destroy_surface (GstGLWindowWaylandEGL * window_egl) if (window_egl->window.callback) wl_callback_destroy (window_egl->window.callback); + + g_source_destroy (window_egl->wl_source); + g_source_unref (window_egl->wl_source); + window_egl->wl_source = NULL; + g_main_loop_unref (window_egl->loop); + window_egl->loop = NULL, g_main_context_unref (window_egl->main_context); + window_egl->main_context = NULL; } static void