From 8e67e8a74a9a64844cc7ffc0528771fca3321965 Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Fri, 30 Dec 2016 10:33:13 +0530 Subject: 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 > Reviewed-on: http://review.gluster.org/16308 > Smoke: Gluster Build System > Reviewed-by: MOHIT AGRAWAL > CentOS-regression: Gluster Build System > NetBSD-regression: NetBSD Build System > Reviewed-by: Shyamsundar Ranganathan > (cherry picked from commit 11b6a2c9fc5232b58774cab29873406c0fbfef19) Change-Id: I4e92e4c87b52f6f5ffb859005aa3d525225b4bda Signed-off-by: N Balachandran Reviewed-on: http://review.gluster.org/16331 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Niels de Vos --- xlators/cluster/dht/src/dht-helper.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- cgit