From b460e58d07fac340b713778f979d23705a8b70ff Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Tue, 4 Jun 2019 05:37:57 +0530 Subject: afr/fini: Free local_pool data during an afr fini We should free the mem_pool local_pool during an afr_fini. Otherwise this will lead to mem leak for shd Change-Id: I805a34a88077bf7b886c28b403798bf9eeeb1c0b Updates: bz#1716695 Signed-off-by: Mohammed Rafi KC --- xlators/cluster/afr/src/afr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index 1cd4f021a01..67ff3409bb9 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -681,6 +681,12 @@ fini(xlator_t *this) priv->timer = NULL; } UNLOCK(&priv->lock); + + if (this->local_pool != NULL) { + mem_pool_destroy(this->local_pool); + this->local_pool = NULL; + } + this->private = NULL; afr_priv_destroy(priv); if (this->itable) { -- cgit