From 1c92eefd50f6ade459b293da6aa5e44b0cd72271 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Wed, 15 Sep 2010 08:14:07 +0000 Subject: free the handle and pmap structure in fini for glusterd Signed-off-by: Raghavendra Bhat Signed-off-by: Vijay Bellur BUG: 1580 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1580 --- xlators/mgmt/glusterd/src/glusterd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 46efb874332..94f0bd6d132 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -431,9 +431,15 @@ out: void fini (xlator_t *this) { - glusterd_conf_t *conf = this->private; + glusterd_conf_t *conf = NULL; + if (!this || !this->private) + goto out; - GF_VALIDATE_OR_GOTO(this->name, conf, out); + conf = this->private; + if (conf->pmap) + FREE (conf->pmap); + if (conf->handle) + glusterd_store_handle_destroy (conf->handle); GF_FREE (conf); this->private = NULL; out: -- cgit