eina: do not access dead pointer from within valgrind macro.

This commit is contained in:
Cedric BAIL 2014-01-22 12:21:43 +09:00
parent 2c0c2b0fed
commit 938aba36eb
1 changed files with 8 additions and 4 deletions

View File

@ -160,6 +160,10 @@ eina_one_big_free(void *data, void *ptr)
{
eina_trash_push(&pool->empty, ptr);
pool->usage--;
#ifndef NVALGRIND
VALGRIND_MEMPOOL_FREE(pool, ptr);
#endif
}
else
{
@ -178,14 +182,14 @@ eina_one_big_free(void *data, void *ptr)
#endif
pool->over_list = eina_inlist_remove(pool->over_list, il);
#ifndef NVALGRIND
VALGRIND_MEMPOOL_FREE(pool, ptr);
#endif
free(ptr);
pool->over--;
}
#ifndef NVALGRIND
VALGRIND_MEMPOOL_FREE(pool, ptr);
#endif
eina_lock_release(&pool->mutex);
}