]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4/torture: let write_stream() deal with stream=NULL
authorRalph Boehme <slow@samba.org>
Fri, 17 Nov 2017 07:13:10 +0000 (08:13 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 5 Dec 2017 09:32:10 +0000 (10:32 +0100)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13155

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit ac880848a905a3840b69af2cb1d842d307401a07)

source4/torture/vfs/fruit.c

index beac24f56cd6fa1afd168c7c1384e633d8fb7afc..c30096c18321bbb1f608fc5f15091121cf111d8d 100644 (file)
@@ -1140,7 +1140,7 @@ static bool write_stream(struct smb2_tree *tree,
        NTSTATUS status;
        const char *full_name;
 
-       full_name = talloc_asprintf(mem_ctx, "%s%s", fname, sname);
+       full_name = talloc_asprintf(mem_ctx, "%s%s", fname, sname ? sname : "");
        if (full_name == NULL) {
            torture_comment(tctx, "talloc_asprintf error\n");
            return false;