summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2010-09-15 08:14:07 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-15 07:28:25 -0700
commit1c92eefd50f6ade459b293da6aa5e44b0cd72271 (patch)
treed214148cd65d92e16ddc71d7283a221fe456dc74
parentc109ffb893ab80dd7b9dac038f5778961859ceff (diff)
free the handle and pmap structure in fini for glusterd
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1580 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1580
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c10
1 files 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: