From 779325060762f2f743a19fc0071838ffc3808bf9 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Fri, 31 May 2013 11:09:40 +0200 Subject: [PATCH] wayland: fix memory leak of display resources. --- gst-libs/gst/vaapi/gstvaapidisplay_wayland.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_wayland.c b/gst-libs/gst/vaapi/gstvaapidisplay_wayland.c index ee25a93b6e..b10165b6dc 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay_wayland.c +++ b/gst-libs/gst/vaapi/gstvaapidisplay_wayland.c @@ -237,6 +237,16 @@ gst_vaapi_display_wayland_close_display(GstVaapiDisplay * display) GstVaapiDisplayWaylandPrivate * const priv = GST_VAAPI_DISPLAY_WAYLAND_GET_PRIVATE(display); + if (priv->output) { + wl_output_destroy(priv->output); + priv->output = NULL; + } + + if (priv->shell) { + wl_shell_destroy(priv->shell); + priv->shell = NULL; + } + if (priv->compositor) { wl_compositor_destroy(priv->compositor); priv->compositor = NULL;