Skip to content

Commit

Permalink
gfapi/upcall: Fix a ref leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
soumyakoduri authored and kalebskeithley committed Jul 24, 2016
1 parent dac9ec0 commit bb48eb4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/src/glfs-handleops.c
Expand Up @@ -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;
Expand Down

0 comments on commit bb48eb4

Please sign in to comment.