summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2012-10-04 13:13:09 +0530
committerVijay Bellur <vbellur@redhat.com>2012-12-12 00:18:46 -0500
commit06578e0fd605043925d161d24f5201a4b3c11718 (patch)
tree0ac7b38f325a411b4a199571819ecbda323d7a85
parent2e47edd40b5c678d4cfa1617568dd8cf78380193 (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: Id13cc74edf367660eef96ce215878e4dac7b4ba1 BUG: 862981 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/53 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1872
-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 f773ce7..e96db29 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -1495,8 +1495,10 @@ out:
}
UNLOCK (&defrag->lock);
- if (defrag)
+ if (defrag) {
GF_FREE (defrag);
+ conf->defrag = NULL;
+ }
return ret;
}
@@ -1507,7 +1509,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;