* evas_preload, ecore_thread: On memory allocation failure do call the cancel function too.

SVN revision: 44624
This commit is contained in:
Cedric BAIL 2009-12-21 12:25:32 +00:00
parent 48bebf06fa
commit 579f2e5447
2 changed files with 10 additions and 2 deletions

View File

@ -226,7 +226,11 @@ ecore_thread_run(void (*func_heavy)(void *data),
Ecore_Pthread_Data *pth;
work = malloc(sizeof (Ecore_Pthread_Worker));
if (!work) return NULL;
if (!work)
{
func_cancel(data);
return NULL;
}
work->func_heavy = func_heavy;
work->func_end = func_end;

View File

@ -181,7 +181,11 @@ evas_preload_thread_run(void (*func_heavy)(void *data),
Evas_Preload_Pthread_Data *pth;
work = malloc(sizeof (Evas_Preload_Pthread_Worker));
if (!work) return NULL;
if (!work)
{
func_cancel(data);
return NULL;
}
work->func_heavy = func_heavy;
work->func_end = func_end;