s4:torture: Do not free full_name before we printed it
authorAndreas Schneider <asn@samba.org>
Wed, 8 May 2019 14:58:07 +0000 (16:58 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 16 May 2019 10:37:56 +0000 (10:37 +0000)
Found by GCC 9.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13937

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 46f036d3231bc99cf37c7cabf82757d3c28c5cff)

source4/torture/vfs/fruit.c

index e460ce20336b00b568b6db289adb1fdb9dfc2a60..e0ba935ff99808f2384493a10b7748ba739f3530 100644 (file)
@@ -1163,11 +1163,11 @@ static bool check_stream(struct smb2_tree *tree,
 
        status = smb2_create(tree, mem_ctx, &create);
        if (!NT_STATUS_IS_OK(status)) {
-               TALLOC_FREE(full_name);
                if (value == NULL) {
                        return true;
                }
                torture_comment(tctx, "Unable to open stream %s\n", full_name);
+               TALLOC_FREE(full_name);
                return false;
        }