From 0ac18907614886fa00858b6a1abfeb099b49348a Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Sat, 2 Oct 2010 02:14:07 +0000 Subject: Replace assert in mem_put with gf_log_callingfn Signed-off-by: shishir gowda Signed-off-by: Vijay Bellur BUG: 1759 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1759 --- libglusterfs/src/mem-pool.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c index 3df317a5ca6..f266ce61f3b 100644 --- a/libglusterfs/src/mem-pool.c +++ b/libglusterfs/src/mem-pool.c @@ -460,7 +460,12 @@ mem_put (struct mem_pool *pool, void *ptr) case 1: list = head = mem_pool_ptr2chunkhead (ptr); in_use = (head + GF_MEM_POOL_LIST_BOUNDARY); - GF_ASSERT (is_mem_chunk_in_use(in_use)); + if (!is_mem_chunk_in_use(in_use)) { + gf_log_callingfn ("mem-pool", GF_LOG_CRITICAL, + "mem_put called on freed ptr %p of mem " + "pool %p", ptr, pool); + break; + } pool->hot_count--; pool->cold_count++; *in_use = 0; -- cgit