diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2019-06-04 05:37:57 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2019-06-17 07:05:38 +0000 |
commit | b460e58d07fac340b713778f979d23705a8b70ff (patch) | |
tree | 3670a59ca374183e48be5f0fe80add0336eff6a7 /xlators/cluster/afr/src/afr.c | |
parent | 632c10b5e976079d825f8808b5e33ab2e1dda469 (diff) |
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 <rkavunga@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.c')
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) { |