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
parent 06ae49f5
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment