summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/eina/mp/chained_pool/eina_chained_mempool.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/eina/mp/chained_pool/eina_chained_mempool.c b/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
index 261b02c200..853457b684 100644
--- a/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
+++ b/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
@@ -274,7 +274,7 @@ eina_chained_mempool_malloc(void *data, EINA_UNUSED unsigned int size)
274{ 274{
275 Chained_Mempool *pool = data; 275 Chained_Mempool *pool = data;
276 Chained_Pool *p = NULL; 276 Chained_Pool *p = NULL;
277 void *mem; 277 void *mem = NULL;
278 278
279 if (!eina_spinlock_take(&pool->mutex)) 279 if (!eina_spinlock_take(&pool->mutex))
280 { 280 {
@@ -321,10 +321,10 @@ eina_chained_mempool_malloc(void *data, EINA_UNUSED unsigned int size)
321 _eina_chained_mp_pool_cmp, NULL); 321 _eina_chained_mp_pool_cmp, NULL);
322 } 322 }
323 323
324 mem = _eina_chained_mempool_alloc_in(pool, pool->first_fill); 324 if (pool->first_fill)
325 mem = _eina_chained_mempool_alloc_in(pool, pool->first_fill);
325 326
326 eina_spinlock_release(&pool->mutex); 327 eina_spinlock_release(&pool->mutex);
327
328 return mem; 328 return mem;
329} 329}
330 330