* evas_preload, ecore_thread: On memory allocation failure do call the cancel functi...
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Dec 2009 12:25:32 +0000 (12:25 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Dec 2009 12:25:32 +0000 (12:25 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@44624 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/cache/evas_preload.c

index e0cfcf9..58977e9 100644 (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;