diff options
-rw-r--r-- | libglusterfs/src/mem-pool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c index bc6bf158eaf..a6b3339bacf 100644 --- a/libglusterfs/src/mem-pool.c +++ b/libglusterfs/src/mem-pool.c @@ -56,8 +56,10 @@ mem_pool_new_fn (unsigned long sizeof_type, mem_pool->cold_count = count; pool = CALLOC (count, sizeof_type + pad); - if (!pool) + if (!pool) { + FREE (mem_pool); return NULL; + } for (i = 0; i < count; i++) { list = pool + (i * (sizeof_type + pad)); |