summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2016-10-07 16:05:29 +0530
committerKarolin Seeger <kseeger@samba.org>2016-10-20 10:45:26 +0200
commit8c9ac5b3d94b3f71c0073573b2e4f9c378c18b44 (patch)
tree12c28745e7a4813ed1149c4b251c14b2a1d1af19 /source3/modules
parente05bae4e803f104247fd53cd1194e66c604b2267 (diff)
downloadsamba-8c9ac5b3d94b3f71c0073573b2e4f9c378c18b44.tar.gz
vfs_glusterfs: Fix a memory leak in connect path
Early return in case of failure to set snapdir-entry-path xlator option leaks talloced tmp_ctx. Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Oct 7 19:39:11 CEST 2016 on sn-devel-144 Bug: https://bugzilla.samba.org/show_bug.cgi?id=12377 (cherry picked from commit 06281e8f1b912540a8cc2a79497b074dbe559d53)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_glusterfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index a4672356873..732ca51e3a7 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -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);