]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
[s4] possible memleak in torture vfs-fruit
authorSwen Schillig <swen@linux.ibm.com>
Wed, 22 Jan 2020 10:55:46 +0000 (11:55 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 4 Mar 2020 10:43:54 +0000 (10:43 +0000)
The allocated memory for "full_name" must be free'd
before returning to caller.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Mar  4 10:43:54 UTC 2020 on sn-devel-184

source4/torture/vfs/fruit.c

index 94cbf27767793b3032ff6b6fa084ac172b397656..01d2890e17d5169c2167933de2fc77969bffe6b8 100644 (file)
@@ -1824,6 +1824,7 @@ static bool check_stream(struct smb2_tree *tree,
        status = smb2_create(tree, mem_ctx, &create);
        if (!NT_STATUS_IS_OK(status)) {
                if (value == NULL) {
+                       TALLOC_FREE(full_name);
                        return true;
                }
                torture_comment(tctx, "Unable to open stream %s\n", full_name);