smbd: Convert fsp_set_smb_fname to cp_smb_filename
authorVolker Lendecke <vl@samba.org>
Thu, 11 Apr 2013 14:26:45 +0000 (16:26 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:49:57 +0000 (14:49 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/files.c

index cba79aefcf072f3b876ca308ec29ef09ffa8521e..a1680fe70e821cb958ec53308a7b573276cd822b 100644 (file)
@@ -723,12 +723,11 @@ NTSTATUS file_name_hash(connection_struct *conn,
 NTSTATUS fsp_set_smb_fname(struct files_struct *fsp,
                           const struct smb_filename *smb_fname_in)
 {
-       NTSTATUS status;
        struct smb_filename *smb_fname_new;
 
-       status = copy_smb_filename(fsp, smb_fname_in, &smb_fname_new);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
+       smb_fname_new = cp_smb_filename(fsp, smb_fname_in);
+       if (smb_fname_new == NULL) {
+               return NT_STATUS_NO_MEMORY;
        }
 
        TALLOC_FREE(fsp->fsp_name);