]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_glusterfs: Fix a memory leak in connect path
authorAnoop C S <anoopcs@redhat.com>
Fri, 7 Oct 2016 10:35:29 +0000 (16:05 +0530)
committerStefan Metzmacher <metze@samba.org>
Mon, 24 Oct 2016 08:56:12 +0000 (10:56 +0200)
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)

source3/modules/vfs_glusterfs.c

index b2ff4a9af6f109cb45e0585b0a41d71346a0d566..6548d7e3f36c215197407402fab2c0d1e56e5611 100644 (file)
@@ -222,8 +222,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);