path: root/api
diff options
authorSoumya Koduri <>2016-07-22 13:15:58 +0530
committerNiels de Vos <>2016-08-03 02:31:11 -0700
commit1f97cc171aa97c4e6941d2c46ed6285d371fda10 (patch)
tree11ac459975db41fcc6aea521041bf99dd8b6fc8c /api
parent3fdf80501f9539067a0801ad279446a4be9013d3 (diff)
gfapi/upcall: Fix a ref leak
inode_find (used to create the handle) takes a reference of the inode. This needs to be un'refernced to avoid leak. This is backport of below master patch - >Change-Id: I22f03577a8f1d9608cfc62d57202cfc4c2ba12b3 >BUG: 1358608 >Signed-off-by: Soumya Koduri <> >Reviewed-on: >Reviewed-by: jiffin tony Thottan <> >Reviewed-by: Jeff Darcy <> >(cherry picked from commit bb48eb46910085928efbd7fb491c5b2db25bba98) Change-Id: Iaa91ee757e3497e25d8669c1592106b6266057a0 BUG: 1362010 Signed-off-by: Soumya Koduri <> Reviewed-on: Smoke: Gluster Build System <> NetBSD-regression: NetBSD Build System <> Tested-by: Oleksandr Natalenko <> CentOS-regression: Gluster Build System <> Reviewed-by: Kaleb KEITHLEY <> Reviewed-by: Niels de Vos <>
Diffstat (limited to 'api')
1 files changed, 4 insertions, 0 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index 0ee7e7d..d09e81d 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -1843,6 +1843,10 @@ glfs_h_find_handle (struct glfs *fs, unsigned char *handle, int len)
gf_uuid_copy (object->gfid, object->inode->gfid);
+ /* inode_find takes a reference. Unref it. */
+ if (newinode)
+ inode_unref (newinode);
glfs_subvol_done (fs, subvol);