Autocomplete: fix memory leak.

Summary:
When context_lexem_thread_cb is canceled - possible, that
td->utf8 memory, that allocated at context_lexem_get
didn't freed.

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D2726
This commit is contained in:
Mykyta Biliavskyi 2015-06-22 14:45:54 +09:00 committed by ChunEon Park
parent 5b3aa7ca3b
commit 7020fec1f3
1 changed files with 3 additions and 3 deletions

View File

@ -209,8 +209,6 @@ context_lexem_thread_cb(void *data, Ecore_Thread *thread EINA_UNUSED)
cur++;
}
free(utf8);
if (quot_cnt % 2)
{
td->result = NULL;
@ -250,6 +248,7 @@ context_lexem_thread_end_cb(void *data, Ecore_Thread *thread EINA_UNUSED)
if (td->list_show && td->result)
candidate_list_show(td->ad);
free(td->utf8);
free(td);
}
@ -263,6 +262,7 @@ context_lexem_thread_cancel_cb(void *data, Ecore_Thread *thread EINA_UNUSED)
candidate_list_show(td->ad);
if (td->ad->cntx_lexem_thread == thread)
td->ad->cntx_lexem_thread = NULL;
free(td->utf8);
free(td);
}