summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-helper.c
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2015-10-01 04:06:43 -0400
committerRaghavendra G <rgowdapp@redhat.com>2015-10-06 04:08:06 -0700
commit229b4d8391b5abf8da662d02d9a5ccab37eb6ab5 (patch)
treecefe485c7546c7eaaa71fdea5db742c3505324e5 /xlators/cluster/dht/src/dht-helper.c
parent84e9a590df0d4ecf6e4b37118bdaf09db9d2740d (diff)
dht/rebalance: fix layout and dict leaks
Change-Id: Ib3911dfa1f950ff9decbe249ad798e97226dd06d BUG: 1266877 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/12295 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-helper.c')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index 3a4217029b9..6d00ce68909 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -437,6 +437,11 @@ dht_local_wipe (xlator_t *this, dht_local_t *local)
local->selfheal.layout = NULL;
}
+ if (local->selfheal.refreshed_layout) {
+ dht_layout_unref (this, local->selfheal.refreshed_layout);
+ local->selfheal.refreshed_layout = NULL;
+ }
+
dht_lock_array_free (local->lock.locks, local->lock.lk_count);
GF_FREE (local->lock.locks);