diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2018-02-15 11:21:34 +0100 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2018-02-16 13:56:50 +0100 |
commit | 1784f628950cfd19e0e164a08e1564339e92fc76 (patch) | |
tree | 3189f29543a1263bb2e6a6754cafdb1c4febf1af | |
parent | 06ae49f525f100005722a50f581103ada58e46c6 (diff) |
gl/wayland: Memory leak when display couldn't connect
When trying to create a wayland display, it may fail because there
is not actually display to connect. It this case NULL is returned
but the created instance is not freed.
This patch unrefs the failed display.
https://bugzilla.gnome.org/show_bug.cgi?id=793483
-rw-r--r-- | gst-libs/gst/gl/wayland/gstgldisplay_wayland.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c b/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c index 054dcf432..6760ecea3 100644 --- a/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c +++ b/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c @@ -130,6 +130,7 @@ gst_gl_display_wayland_new (const gchar * name) } else { GST_INFO ("Failed to open Wayland display connection."); } + gst_object_unref (ret); return NULL; } |