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
This commit is contained in:
Víctor Manuel Jáquez Leal 2018-02-15 11:21:34 +01:00
parent 06ae49f525
commit 1784f62895

View file

@ -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;
}