Maybe the third time is a charm to avoid fall through and assume on the
exit path we do have a wl_display.
Bug-AGL: SPEC-4935
Reported-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
Tested-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4adef5bf72d6b1a32a218bf1cfa6c8ed4450ba48
wl_display = wl_display_connect(NULL);
if (!wl_display) {
wl_display = wl_display_connect(NULL);
if (!wl_display) {
+ ret = -1;
+ goto err_failed_display;
}
registry = wl_display_get_registry(wl_display);
sh->wait_for_bound = true;
}
registry = wl_display_get_registry(wl_display);
sh->wait_for_bound = true;
err:
wl_registry_destroy(registry);
wl_display_disconnect(wl_display);
err:
wl_registry_destroy(registry);
wl_display_disconnect(wl_display);