libs: display: egl: free leaked memory
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 10 Oct 2017 12:01:59 +0000 (14:01 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 1 Nov 2017 10:27:36 +0000 (11:27 +0100)
The EGL VAAPI display forgot to release the egl display, context and
proxied VAAPI display.

https://bugzilla.gnome.org/show_bug.cgi?id=773453

gst-libs/gst/vaapi/gstvaapidisplay_egl.c

index fd5814e..883257a 100644 (file)
@@ -286,6 +286,11 @@ gst_vaapi_display_egl_finalize (GObject * object)
    * proxied display share the same vaDisplay */
   GST_VAAPI_DISPLAY_VADISPLAY (object) = NULL;
 
+  egl_object_replace (&dpy->egl_display, NULL);
+  egl_object_replace (&dpy->egl_context, NULL);
+
+  gst_vaapi_display_replace (&dpy->display, NULL);
+
   G_OBJECT_CLASS (gst_vaapi_display_egl_parent_class)->finalize (object);
 }