summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2018-02-02 18:32:32 +0530
committerAmar Tumballi <amarts@redhat.com>2018-02-02 18:46:06 +0000
commitfe87f3e34fc1c983731a8b84968d49db2b96c824 (patch)
treeb05158dec0da1ab8bb77def48b85b895afc1103e /xlators/cluster/dht/src
parent545a7ce6762a1b3a7b989b43a9d18b5b1b299df0 (diff)
cluster/dht: Fixed a leak in inode_ref
Introduced by commit d9f773ba719397c128 Change-Id: I3f3103a5a80daed7562ace72e5aa53b77e74fb94 BUG: 1541264 Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r--xlators/cluster/dht/src/dht-common.c5
1 files changed, 2 insertions, 3 deletions
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;
}