summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2016-12-30 10:33:13 +0530
committerNiels de Vos <ndevos@redhat.com>2017-01-08 02:53:49 -0800
commit8e67e8a74a9a64844cc7ffc0528771fca3321965 (patch)
tree8bd14c1be4e2a2f62727583096e76cc4eaef1382
parentc539e23023abe743770287439ebe81989a732728 (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. BUG: 1410369 > 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> > (cherry picked from commit 11b6a2c9fc5232b58774cab29873406c0fbfef19) Change-Id: I4e92e4c87b52f6f5ffb859005aa3d525225b4bda Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/16331 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
-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 255c0823aac..5e7f5fa4eb1 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;
}