summaryrefslogtreecommitdiffstats
path: root/xlators
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
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')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c5
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c6
2 files changed, 11 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);
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 5b154f531b4..c53c7a99882 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -2102,6 +2102,12 @@ gf_defrag_get_entry (xlator_t *this, int i, struct dht_container **container,
gf_uuid_copy (entry_loc.pargfid, loc->gfid);
entry_loc.inode->ia_type = df_entry->d_stat.ia_type;
+
+ if (xattr_rsp) {
+ dict_unref (xattr_rsp);
+ xattr_rsp = NULL;
+ }
+
ret = syncop_lookup (conf->local_subvols[i], &entry_loc,
&iatt, NULL, xattr_req, &xattr_rsp);
if (ret) {