summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/mem-pool.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c
index a2889146a5b..a972f67bb17 100644
--- a/libglusterfs/src/mem-pool.c
+++ b/libglusterfs/src/mem-pool.c
@@ -849,6 +849,9 @@ mem_put (void *ptr)
void
mem_pool_destroy (struct mem_pool *pool)
{
+ if (!pool)
+ return;
+
/* remove this pool from the owner (glusterfs_ctx_t) */
LOCK (&pool->ctx->lock);
{