From: Volker Lendecke Date: Mon, 7 Oct 2013 20:13:28 +0000 (+0000) Subject: smbd: Fix an error path in open_directory X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=02393156de280748d4e87f231d477fa70437a8a0;p=mat%2Fsamba.git smbd: Fix an error path in open_directory In open_file_ntcreate we do the del_share_mode on error. We should do it here as well. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Oct 9 01:58:55 CEST 2013 on sn-devel-104 --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 55f2fb2164..5024c90285 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3190,6 +3190,7 @@ static NTSTATUS open_directory(connection_struct *conn, if (create_options & FILE_DELETE_ON_CLOSE) { status = can_set_delete_on_close(fsp, 0); if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_DIRECTORY_NOT_EMPTY)) { + del_share_mode(lck, fsp); TALLOC_FREE(lck); fd_close(fsp); file_free(req, fsp);