pysmbd: Convert py_smbd_unlink to synthetic_smb_fname
authorVolker Lendecke <vl@samba.org>
Fri, 12 Apr 2013 10:14:32 +0000 (12:14 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:50:00 +0000 (14:50 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/pysmbd.c

index c1d3b4bc794fd2e2f41d0f5406dfe7c3c2b0f7e9..683c48ccf75a24b67270c7b3fe9ee840420cdb0c 100644 (file)
@@ -424,11 +424,10 @@ static PyObject *py_smbd_unlink(PyObject *self, PyObject *args, PyObject *kwargs
                return NULL;
        }
 
-       status = create_synthetic_smb_fname_split(frame, fname, NULL,
-                                                 &smb_fname);
-       if (!NT_STATUS_IS_OK(status)) {
+       smb_fname = synthetic_smb_fname_split(frame, fname, NULL);
+       if (smb_fname == NULL) {
                TALLOC_FREE(frame);
-               PyErr_NTSTATUS_IS_ERR_RAISE(status);
+               PyErr_NTSTATUS_IS_ERR_RAISE(NT_STATUS_NO_MEMORY);
        }
 
        ret = SMB_VFS_UNLINK(conn, smb_fname);