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)
committerJeremy Allison <jra@samba.org>
Wed, 8 May 2019 16:33:24 +0000 (16:33 +0000)
Found by GCC 9.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/vfs/fruit.c

index 43f5167bd11f4abc5ea115fdb59033c9ad015710..45c7aaac7a352760d169a94362cdec7e23edba88 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;
        }