From e3a7f707686973af04afd1022820a4aabdae95ac Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 15 Apr 2013 11:03:44 +0200 Subject: [PATCH] smbd: Convert file_new to synthetic_smb_fname Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/files.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source3/smbd/files.c b/source3/smbd/files.c index a1680fe70e8..d94ee119527 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -115,11 +115,10 @@ NTSTATUS file_new(struct smb_request *req, connection_struct *conn, * few NULL checks, so make sure it's initialized with something. to * be safe until an audit can be done. */ - status = create_synthetic_smb_fname(fsp, "", NULL, NULL, - &fsp->fsp_name); - if (!NT_STATUS_IS_OK(status)) { + fsp->fsp_name = synthetic_smb_fname(fsp, "", NULL, NULL); + if (fsp->fsp_name == NULL) { file_free(NULL, fsp); - return status; + return NT_STATUS_NO_MEMORY; } DEBUG(5,("allocated file structure %s (%u used)\n", -- 2.34.1