free on success, not failure of pthread_join.
authorCarsten Haitzler <raster@rasterman.com>
Mon, 20 Jun 2011 06:44:37 +0000 (06:44 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Mon, 20 Jun 2011 06:44:37 +0000 (06:44 +0000)
SVN revision: 60499

legacy/evas/src/lib/cache/evas_preload.c

index b6b434b..6e0412a 100644 (file)
@@ -53,8 +53,8 @@ _evas_preload_thread_end(void *data)
    Evas_Preload_Pthread_Data *pth = data;
    Evas_Preload_Pthread_Data *p = NULL;
 
-   if (pthread_join(pth->thread, (void **)&p) != 0) free(p);
-
+   if (pthread_join(pth->thread, (void **)&p) == 0) free(p);
+   else return;
    eina_threads_shutdown();
 }