diff options
author | Chris Michael <cp.michael@samsung.com> | 2013-07-08 12:54:42 +0100 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2013-07-08 12:54:42 +0100 |
commit | 18a971900303f89f2d6baab71d39f5696166a02b (patch) | |
tree | 1c6aaacf50ff6a5244862484519b3207f6d50594 /src/lib/ecore | |
parent | aedff2dc317cfde6eeff96c9922f77074c191e07 (diff) |
Fix memleak of Ecore_Thread_Data reported by Coverity
NB: Fixes Coverity CID1039280
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore')
-rw-r--r-- | src/lib/ecore/ecore_thread.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index a89e247b4d..255aa21ce4 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, | |||
1201 | d->cb = cb; | 1201 | d->cb = cb; |
1202 | 1202 | ||
1203 | if (!_ecore_thread_global_hash) | 1203 | if (!_ecore_thread_global_hash) |
1204 | return EINA_FALSE; | 1204 | { |
1205 | free(d); | ||
1206 | return EINA_FALSE; | ||
1207 | } | ||
1208 | |||
1205 | LRWKWL(_ecore_thread_global_hash_lock); | 1209 | LRWKWL(_ecore_thread_global_hash_lock); |
1206 | if (direct) | 1210 | if (direct) |
1207 | ret = eina_hash_direct_add(_ecore_thread_global_hash, key, d); | 1211 | ret = eina_hash_direct_add(_ecore_thread_global_hash, key, d); |