summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2012-05-30 22:34:25 +0530
committerAnand Avati <avati@redhat.com>2012-05-31 17:51:27 -0700
commit4a92900e5fc7814cca2574453654b9f9cca7f43a (patch)
treea4b701bd52d5a10ff59873c59a9b15f8901038e9 /xlators
parent833a2225449d1f4873647a61c8ba481e4db1ec4b (diff)
cluster/dht: set conf->defrag to NULL after freeing the defrag structure
Also no need to free the xlator object after rebalance is over, as the process is about to be killed. Change-Id: I6973e43c0353b5de61c0b39e52a22c618be361f4 BUG: 826584 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3495 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 32c1774be00..88c84dd37ec 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -1512,8 +1512,10 @@ out:
}
UNLOCK (&defrag->lock);
- if (defrag)
+ if (defrag) {
GF_FREE (defrag);
+ conf->defrag = NULL;
+ }
return ret;
}
@@ -1524,7 +1526,6 @@ gf_defrag_done (int ret, call_frame_t *sync_frame, void *data)
{
gf_listener_stop();
- GF_FREE (data);
STACK_DESTROY (sync_frame->root);
kill (getpid(), SIGTERM);
return 0;