slight mistake - trash cleanup on shutdown didnt null out base
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 23 Oct 2010 04:40:30 +0000 (04:40 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 23 Oct 2010 04:40:30 +0000 (04:40 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@53797 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/mp/one_big/eina_one_big.c

index 47c9f22..6106b83 100644 (file)
@@ -267,6 +267,7 @@ eina_one_big_shutdown(void *data)
    if (pool->empty)
      {
         void *mem = eina_trash_pop(&pool->empty);
+        if (mem == pool->base) pool->base = NULL;
         free(mem);
      }
    if (pool->over > 0)
@@ -307,7 +308,7 @@ eina_one_big_shutdown(void *data)
    VALGRIND_DESTROY_MEMPOOL(pool);
 #endif
 
-   free(pool->base);
+   if (pool->base) free(pool->base);
    
 #ifdef EFL_HAVE_THREADS
 # ifdef EFL_HAVE_POSIX_THREADS