Just mark memory as freed after actually freeing it.

Otherwise valgrind would complain about invalid memory access.



SVN revision: 53426
This commit is contained in:
Rafael Fonseca 2010-10-14 19:19:13 +00:00
parent 94fb47d168
commit 4bd0432caf
1 changed files with 4 additions and 4 deletions

View File

@ -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)
{