summaryrefslogtreecommitdiff
path: root/src/modules/eina
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@samsung.com>2014-01-22 12:21:43 +0900
committerCedric BAIL <cedric.bail@samsung.com>2014-01-22 12:22:13 +0900
commit938aba36eb2e7fbd83ff7ee46b1b713cc8a46c32 (patch)
tree1935cb124348984274b5e0e3fff47e2a5f4fd337 /src/modules/eina
parent2c0c2b0fed6bc5d696b3e85d2da0bd943edac68e (diff)
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.c12
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)
160 { 160 {
161 eina_trash_push(&pool->empty, ptr); 161 eina_trash_push(&pool->empty, ptr);
162 pool->usage--; 162 pool->usage--;
163
164#ifndef NVALGRIND
165 VALGRIND_MEMPOOL_FREE(pool, ptr);
166#endif
163 } 167 }
164 else 168 else
165 { 169 {
@@ -178,13 +182,13 @@ eina_one_big_free(void *data, void *ptr)
178#endif 182#endif
179 183
180 pool->over_list = eina_inlist_remove(pool->over_list, il); 184 pool->over_list = eina_inlist_remove(pool->over_list, il);
181 free(ptr);
182 pool->over--;
183 }
184 185
185#ifndef NVALGRIND 186#ifndef NVALGRIND
186 VALGRIND_MEMPOOL_FREE(pool, ptr); 187 VALGRIND_MEMPOOL_FREE(pool, ptr);
187#endif 188#endif
189 free(ptr);
190 pool->over--;
191 }
188 192
189 eina_lock_release(&pool->mutex); 193 eina_lock_release(&pool->mutex);
190} 194}