diff options
author | Soumya Koduri <skoduri@redhat.com> | 2016-07-22 13:15:58 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2016-07-24 02:55:28 -0700 |
commit | bb48eb46910085928efbd7fb491c5b2db25bba98 (patch) | |
tree | 12757a49e22bad28c8c5df42690972723101fa83 /api/src | |
parent | dac9ec0c015e748c0e7909496cdc636831975e0e (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.
Change-Id: I22f03577a8f1d9608cfc62d57202cfc4c2ba12b3
BUG: 1358608
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/14984
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'api/src')
-rw-r--r-- | api/src/glfs-handleops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index c68a54512d3..7623b29f0cb 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -1841,6 +1841,10 @@ glfs_h_find_handle (struct glfs *fs, unsigned char *handle, int len) gf_uuid_copy (object->gfid, object->inode->gfid); out: + /* inode_find takes a reference. Unref it. */ + if (newinode) + inode_unref (newinode); + glfs_subvol_done (fs, subvol); __GLFS_EXIT_FS; |