From: Ralph Boehme Date: Fri, 17 Nov 2017 07:13:10 +0000 (+0100) Subject: s4/torture: let write_stream() deal with stream=NULL X-Git-Tag: samba-4.6.12~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de13adb40dae0db2ac802bf7cba7e1a002001c3d;p=thirdparty%2Fsamba.git s4/torture: let write_stream() deal with stream=NULL Bug: https://bugzilla.samba.org/show_bug.cgi?id=13155 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit ac880848a905a3840b69af2cb1d842d307401a07) --- diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c index beac24f56cd..c30096c1832 100644 --- a/source4/torture/vfs/fruit.c +++ b/source4/torture/vfs/fruit.c @@ -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;