eina_thread: fix memory leak

Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1737
This commit is contained in:
kabeer khan 2014-12-08 09:19:28 +01:00 committed by Cedric BAIL
parent c13ee92297
commit 378157ba1e
1 changed files with 5 additions and 1 deletions

View File

@ -97,9 +97,13 @@ _eina_thread_tls_keys_clean(Eina_Thread_Win32 *tw)
EAPI Eina_Bool
_eina_thread_tls_cb_register(Eina_TLS key, Eina_TLS_Delete_Cb cb)
{
Eina_TLS_Cbs_Win32 *tls_cb = malloc(sizeof(Eina_TLS_Cbs_Win32));
Eina_TLS_Cbs_Win32 *tls_cb;
if (!cb) return EINA_FALSE;
tls_cb = malloc(sizeof(Eina_TLS_Cbs_Win32));
if (!tls_cb) return EINA_FALSE;
tls_cb->key = key;
tls_cb->cb = cb;
_tls_keys_cbs = eina_list_append(_tls_keys_cbs, tls_cb);