s3: modules: vfs_glusterfs: Fix leak of char **lines onto mem_ctx on return.
authorJeremy Allison <jra@samba.org>
Mon, 2 Nov 2020 23:46:51 +0000 (15:46 -0800)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 3 Nov 2020 01:56:59 +0000 (01:56 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14486

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Nov  3 01:56:59 UTC 2020 on sn-devel-184

source3/modules/vfs_glusterfs.c

index eea5b30e327176b0c33721987377f282f196552e..dacedd8e04a8af12df4754a8946d213dac71bb6e 100644 (file)
@@ -338,11 +338,13 @@ static int check_for_write_behind_translator(TALLOC_CTX *mem_ctx,
                        "Please check the vfs_glusterfs(8) manpage for "
                        "further details.\n",
                        volume);
+               TALLOC_FREE(lines);
                TALLOC_FREE(option);
                TALLOC_FREE(buf);
                return -1;
        }
 
+       TALLOC_FREE(lines);
        TALLOC_FREE(option);
        TALLOC_FREE(buf);
        return 0;