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

index d0c843ea9cc9c981d8c013be386f162daca4cc4e..a7c6b3e3731f53746e18bd7a88581b2b23b33877 100644 (file)
@@ -291,18 +291,18 @@ NTSTATUS delete_all_streams(connection_struct *conn, const char *fname)
 
        for (i=0; i<num_streams; i++) {
                int res;
-               struct smb_filename *smb_fname_stream = NULL;
+               struct smb_filename *smb_fname_stream;
 
                if (strequal(stream_info[i].name, "::$DATA")) {
                        continue;
                }
 
-               status = create_synthetic_smb_fname(talloc_tos(), fname,
-                                                   stream_info[i].name, NULL,
-                                                   &smb_fname_stream);
+               smb_fname_stream = synthetic_smb_fname(
+                       talloc_tos(), fname, stream_info[i].name, NULL);
 
-               if (!NT_STATUS_IS_OK(status)) {
+               if (smb_fname_stream == NULL) {
                        DEBUG(0, ("talloc_aprintf failed\n"));
+                       status = NT_STATUS_NO_MEMORY;
                        goto fail;
                }