diff options
author | Cedric BAIL <cedric.bail@samsung.com> | 2014-01-22 12:21:43 +0900 |
---|---|---|
committer | Cedric BAIL <cedric.bail@samsung.com> | 2014-01-22 12:22:13 +0900 |
commit | 938aba36eb2e7fbd83ff7ee46b1b713cc8a46c32 (patch) | |
tree | 1935cb124348984274b5e0e3fff47e2a5f4fd337 /src/modules/eina | |
parent | 2c0c2b0fed6bc5d696b3e85d2da0bd943edac68e (diff) | |
download | efl-938aba36eb2e7fbd83ff7ee46b1b713cc8a46c32.tar.gz |
eina: do not access dead pointer from within valgrind macro.
Diffstat (limited to 'src/modules/eina')
-rw-r--r-- | src/modules/eina/mp/one_big/eina_one_big.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/eina/mp/one_big/eina_one_big.c b/src/modules/eina/mp/one_big/eina_one_big.c index e384e52632..4bfe2a86b7 100644 --- a/src/modules/eina/mp/one_big/eina_one_big.c +++ b/src/modules/eina/mp/one_big/eina_one_big.c @@ -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,13 +182,13 @@ eina_one_big_free(void *data, void *ptr) #endif pool->over_list = eina_inlist_remove(pool->over_list, il); - free(ptr); - pool->over--; - } #ifndef NVALGRIND - VALGRIND_MEMPOOL_FREE(pool, ptr); + VALGRIND_MEMPOOL_FREE(pool, ptr); #endif + free(ptr); + pool->over--; + } eina_lock_release(&pool->mutex); } |