If we fail to connect to an existing wayland display, then we should
properly cleanup (call ecore_wl2_shutdown) before exiting
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
if (!ewd)
{
ERR("Failed to connect to Wayland Display %s", disp_name);
- return NULL;
+ goto conn_err;
}
if (!(ee = calloc(1, sizeof(Ecore_Evas))))
return ee;
- err:
+err:
ecore_evas_free(ee);
- return NULL;
-
- ee_err:
- ecore_wl_shutdown();
+ee_err:
+ ecore_wl2_display_disconnect(ewd);
+conn_err:
+ ecore_wl2_shutdown();
return NULL;
}
if (!ewd)
{
ERR("Failed to connect to Wayland Display %s", disp_name);
- return NULL;
+ goto conn_err;
}
if (!(ee = calloc(1, sizeof(Ecore_Evas))))
return ee;
- err:
+err:
ecore_evas_free(ee);
- return NULL;
-
- ee_err:
+ee_err:
ecore_wl2_display_disconnect(ewd);
+conn_err:
ecore_wl2_shutdown();
return NULL;
}