From 873d48843931c05269265dd786eaeb7984568a1c Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Fri, 7 Oct 2016 16:05:29 +0530 Subject: [PATCH] vfs_glusterfs: Fix a memory leak in connect path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Early return in case of failure to set snapdir-entry-path xlator option leaks talloced tmp_ctx. Signed-off-by: Anoop C S Reviewed-by: Guenther Deschner Reviewed-by: Andreas Schneider Autobuild-User(master): Günther Deschner 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) --- source3/modules/vfs_glusterfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 84530a8..8e4e3cc 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -223,8 +223,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); -- 2.7.4