From 8d627e971804aeab299e48df308d5a01ba4aa39a Mon Sep 17 00:00:00 2001 From: rfonseca Date: Thu, 14 Oct 2010 19:19:13 +0000 Subject: [PATCH] Just mark memory as freed after actually freeing it. Otherwise valgrind would complain about invalid memory access. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@53426 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/mp/chained_pool/eina_chained_mempool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/mp/chained_pool/eina_chained_mempool.c b/src/modules/mp/chained_pool/eina_chained_mempool.c index fac12f5..a4e143c 100644 --- a/src/modules/mp/chained_pool/eina_chained_mempool.c +++ b/src/modules/mp/chained_pool/eina_chained_mempool.c @@ -246,10 +246,6 @@ eina_chained_mempool_free(void *data, void *ptr) #endif #endif -#ifndef NVALGRIND - VALGRIND_MEMPOOL_FREE(pool, ptr); -#endif - EINA_INLIST_FOREACH(pool->first, p) { // Could the pointer be inside that pool @@ -280,6 +276,10 @@ eina_chained_mempool_free(void *data, void *ptr) } } +#ifndef NVALGRIND + VALGRIND_MEMPOOL_FREE(pool, ptr); +#endif + #ifdef EFL_HAVE_THREADS if (_threads_activated) { -- 2.7.4