summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-helper.c
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2016-12-30 10:33:13 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-01-02 07:30:09 -0800
commit11b6a2c9fc5232b58774cab29873406c0fbfef19 (patch)
tree8df10ac4c67659b76dace5052daae5ae4f20153b /xlators/cluster/dht/src/dht-helper.c
parent6b88186c804b05ac05f0613b9ec290e2373d3bbb (diff)
cluster/dht: Fix dict_leak in migration check tasks
Fixed a memleak where dict was not being unrefed in the dht_migration_complete_check_task and dht_rebalance_inprogress_task functions. Change-Id: I3d42e9a2e5c8596c985bf6431a68fd3905227383 BUG: 1409186 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/16308 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: MOHIT AGRAWAL <moagrawa@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-helper.c')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index a1210f1b273..ad031b6216c 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -1320,6 +1320,9 @@ unlock:
UNLOCK(&inode->lock);
out:
+ if (dict) {
+ dict_unref (dict);
+ }
loc_wipe (&tmp_loc);
@@ -1588,6 +1591,10 @@ unlock:
ret = 0;
out:
+ if (dict) {
+ dict_unref (dict);
+ }
+
loc_wipe (&tmp_loc);
return ret;
}