From: cedric Date: Mon, 21 Dec 2009 12:25:32 +0000 (+0000) Subject: * evas_preload, ecore_thread: On memory allocation failure do call the cancel functi... X-Git-Tag: build/2012-07-04.173327~2342 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fce2cbf4183e9a426870f243a47d55d34cc857d7;p=profile%2Fivi%2Fecore.git * evas_preload, ecore_thread: On memory allocation failure do call the cancel function too. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@44624 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index e4498e5..39cc829 100644 --- a/src/lib/ecore/ecore_thread.c +++ b/src/lib/ecore/ecore_thread.c @@ -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;