smbd: Convert file_new to synthetic_smb_fname
authorVolker Lendecke <vl@samba.org>
Mon, 15 Apr 2013 09:03:44 +0000 (11:03 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:50:01 +0000 (14:50 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/files.c

index a1680fe70e821cb958ec53308a7b573276cd822b..d94ee119527b524af2c3bb14180191e2cd746082 100644 (file)
@@ -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.
         */
         * 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);
                file_free(NULL, fsp);
-               return status;
+               return NT_STATUS_NO_MEMORY;
        }
 
        DEBUG(5,("allocated file structure %s (%u used)\n",
        }
 
        DEBUG(5,("allocated file structure %s (%u used)\n",