Fix memleak of Ecore_Thread_Data reported by Coverity

NB: Fixes Coverity CID1039280

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-08 12:54:42 +01:00
parent aedff2dc31
commit 18a9719003
1 changed files with 5 additions and 1 deletions

View File

@ -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);