From fe87f3e34fc1c983731a8b84968d49db2b96c824 Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Fri, 2 Feb 2018 18:32:32 +0530 Subject: cluster/dht: Fixed a leak in inode_ref Introduced by commit d9f773ba719397c128 Change-Id: I3f3103a5a80daed7562ace72e5aa53b77e74fb94 BUG: 1541264 Signed-off-by: N Balachandran --- xlators/cluster/dht/src/dht-common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xlators/cluster/dht/src/dht-common.c') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index ec6e3d857c1..d41d07fc6e8 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -6341,8 +6341,7 @@ dht_populate_inode_for_dentry (xlator_t *this, xlator_t *subvol, loc.inode = inode_ref (orig_entry->inode); if (is_revalidate (&loc)) { - loc_wipe (&loc); - return; + goto out; } layout = dht_layout_new (this, 1); @@ -6358,13 +6357,13 @@ dht_populate_inode_for_dentry (xlator_t *this, xlator_t *subvol, layout = NULL; } - loc_wipe (&loc); } if (layout) dht_layout_unref (this, layout); out: + loc_wipe (&loc); return; } -- cgit