forked from enlightenment/efl
ecore-evas-wayland: Properly cleanup ecore_wl2 during error
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>
This commit is contained in:
parent
04a4b599ab
commit
49e645d695
|
@ -146,7 +146,7 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
|
|||
if (!ewd)
|
||||
{
|
||||
ERR("Failed to connect to Wayland Display %s", disp_name);
|
||||
return NULL;
|
||||
goto conn_err;
|
||||
}
|
||||
|
||||
if (!(ee = calloc(1, sizeof(Ecore_Evas))))
|
||||
|
@ -286,10 +286,10 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
|
|||
|
||||
err:
|
||||
ecore_evas_free(ee);
|
||||
return NULL;
|
||||
|
||||
ee_err:
|
||||
ecore_wl_shutdown();
|
||||
ecore_wl2_display_disconnect(ewd);
|
||||
conn_err:
|
||||
ecore_wl2_shutdown();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
|
|||
if (!ewd)
|
||||
{
|
||||
ERR("Failed to connect to Wayland Display %s", disp_name);
|
||||
return NULL;
|
||||
goto conn_err;
|
||||
}
|
||||
|
||||
if (!(ee = calloc(1, sizeof(Ecore_Evas))))
|
||||
|
@ -282,10 +282,9 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
|
|||
|
||||
err:
|
||||
ecore_evas_free(ee);
|
||||
return NULL;
|
||||
|
||||
ee_err:
|
||||
ecore_wl2_display_disconnect(ewd);
|
||||
conn_err:
|
||||
ecore_wl2_shutdown();
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue