Skip to content

Commit

Permalink
vfs_glusterfs: Fix a memory leak in connect path
Browse files Browse the repository at this point in the history
Early return in case of failure to set snapdir-entry-path xlator option
leaks talloced tmp_ctx.

Signed-off-by: Anoop C S <[email protected]>
Reviewed-by: Guenther Deschner <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>

Autobuild-User(master): Günther Deschner <[email protected]>
Autobuild-Date(master): Fri Oct  7 19:39:11 CEST 2016 on sn-devel-144
  • Loading branch information
anoopcs9 authored and gd committed Oct 7, 2016
1 parent 945e55c commit 06281e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source3/modules/vfs_glusterfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
if (ret < 0) {
DEBUG(0, ("%s: Failed to set xlator option:"
" snapdir-entry-path\n", volume));
glfs_fini(fs);
return -1;
goto done;
}

ret = glfs_set_logging(fs, logfile, loglevel);
Expand Down

0 comments on commit 06281e8

Please sign in to comment.