From 6bcc18bf4f3f36b0cebed9c8645d7e1453fcdc73 Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Fri, 30 Dec 2016 10:33:13 +0530 Subject: [PATCH 519/525] 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: 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 Change-Id: I3d42e9a2e5c8596c985bf6431a68fd3905227383 BUG: 1462066 Signed-off-by: N Balachandran Reviewed-on: https://code.engineering.redhat.com/gerrit/109329 Reviewed-by: Atin Mukherjee --- 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 40c6eb5..f6cbe2c 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -1319,6 +1319,9 @@ unlock: UNLOCK(&inode->lock); out: + if (dict) { + dict_unref (dict); + } loc_wipe (&tmp_loc); @@ -1587,6 +1590,10 @@ unlock: ret = 0; out: + if (dict) { + dict_unref (dict); + } + loc_wipe (&tmp_loc); return ret; } -- 1.8.3.1