From 11b6a2c9fc5232b58774cab29873406c0fbfef19 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. 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 --- xlators/cluster/dht/src/dht-helper.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators/cluster/dht/src') 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; } -- cgit