discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0d1179abe32d80afa54131667e3819e5a38e5764

commit 0d1179abe32d80afa54131667e3819e5a38e5764
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Dec 10 11:18:24 2015 -0500

    ecore-wl2: ensure client display hash is freed and set NULL on connect 
failure
---
 src/lib/ecore_wl2/ecore_wl2_display.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c 
b/src/lib/ecore_wl2/ecore_wl2_display.c
index ceb6f10..f38db3b 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -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:

-- 


Reply via email to