From 19ee0708538a2358584de2a5498a470c5a168ec3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 11 Apr 2013 15:31:27 +0200 Subject: vfs: Convert posix_eadb_unlink to cp_smb_filename Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/modules/vfs_posix_eadb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/modules') diff --git a/source3/modules/vfs_posix_eadb.c b/source3/modules/vfs_posix_eadb.c index fff7c11dce..d188780b29 100644 --- a/source3/modules/vfs_posix_eadb.c +++ b/source3/modules/vfs_posix_eadb.c @@ -284,16 +284,15 @@ static int posix_eadb_unlink(vfs_handle_struct *handle, const struct smb_filename *smb_fname) { struct smb_filename *smb_fname_tmp = NULL; - NTSTATUS status; int ret = -1; struct tdb_wrap *ea_tdb; SMB_VFS_HANDLE_GET_DATA(handle, ea_tdb, struct tdb_wrap, return -1); - status = copy_smb_filename(talloc_tos(), smb_fname, &smb_fname_tmp); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); + smb_fname_tmp = cp_smb_filename(talloc_tos(), smb_fname); + if (smb_fname_tmp == NULL) { + errno = ENOMEM; return -1; } @@ -307,6 +306,8 @@ static int posix_eadb_unlink(vfs_handle_struct *handle, } if (smb_fname_tmp->st.st_ex_nlink == 1) { + NTSTATUS status; + /* Only remove record on last link to file. */ if (tdb_transaction_start(ea_tdb->tdb) != 0) { -- cgit