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)
committerGünther Deschner <gd@samba.org>
Fri, 7 Oct 2016 17:39:11 +0000 (19:39 +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

source3/modules/vfs_glusterfs.c

index a467235687393585d1fa892e1a3eab726b3d039b..732ca51e3a7a71f673323bc49e9f7bf21484f81f 100644 (file)
@@ -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);