ecore-wl2: ensure client display hash is freed and set NULL on connect failure

This commit is contained in:
Mike Blumenkrantz 2015-12-10 11:18:24 -05:00
parent 7500ef6f8c
commit 0d1179abe3
1 changed files with 6 additions and 1 deletions

View File

@ -512,6 +512,7 @@ ecore_wl2_display_connect(const char *name)
Eina_Bool sync = EINA_TRUE;
struct wl_callback *cb;
const char *n;
Eina_Bool hash_create = !_client_displays;
if (!_client_displays)
_client_displays = eina_hash_string_superfast_new(NULL);
@ -629,7 +630,11 @@ connect_err:
return NULL;
name_err:
eina_hash_free(_client_displays);
if (hash_create)
{
eina_hash_free(_client_displays);
_client_displays = NULL;
}
return NULL;
found: