summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht.c')
-rw-r--r--xlators/cluster/dht/src/dht.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c
index c25cdb4fd80..c5128544279 100644
--- a/xlators/cluster/dht/src/dht.c
+++ b/xlators/cluster/dht/src/dht.c
@@ -391,6 +391,8 @@ init (xlator_t *this)
defrag->is_exiting = 0;
+ conf->defrag = defrag;
+
ret = dict_get_str (this->options, "node-uuid", &node_uuid);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "node-uuid not "
@@ -407,9 +409,6 @@ init (xlator_t *this)
defrag->cmd = cmd;
defrag->stats = _gf_false;
-
- conf->defrag = defrag;
-
}
conf->search_unhashed = GF_DHT_LOOKUP_UNHASHED_ON;
@@ -493,6 +492,9 @@ err:
if (conf->du_stats)
GF_FREE (conf->du_stats);
+ if (conf->defrag)
+ GF_FREE (conf->defrag);
+
GF_FREE (conf);
}