devilhorns pushed a commit to branch master.

commit 18a971900303f89f2d6baab71d39f5696166a02b
Author: Chris Michael <[email protected]>
Date:   Mon Jul 8 12:54:42 2013 +0100

    Fix memleak of Ecore_Thread_Data reported by Coverity
    
    NB: Fixes Coverity CID1039280
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore/ecore_thread.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c
index a89e247..255aa21 100644
--- a/src/lib/ecore/ecore_thread.c
+++ b/src/lib/ecore/ecore_thread.c
@@ -1201,7 +1201,11 @@ ecore_thread_global_data_add(const char  *key,
    d->cb = cb;
 
    if (!_ecore_thread_global_hash)
-     return EINA_FALSE;
+     {
+        free(d);
+        return EINA_FALSE;
+     }
+
    LRWKWL(_ecore_thread_global_hash_lock);
    if (direct)
      ret = eina_hash_direct_add(_ecore_thread_global_hash, key, d);

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to