From 8b7e75b3582f288774016ab3d5d32911959da5aa Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 26 Sep 2012 22:20:57 +0200 Subject: s3: Close the now opened file descriptor in error paths --- source3/smbd/open.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/smbd/open.c') diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 8fe87d5a51..b4eeeca595 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2348,6 +2348,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, if (NT_STATUS_EQUAL(status, NT_STATUS_DELETE_PENDING)) { /* DELETE_PENDING is not deferred for a second */ TALLOC_FREE(lck); + fd_close(fsp); return status; } @@ -2366,6 +2367,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, DEBUG(0, ("DOS open without an SMB " "request!\n")); TALLOC_FREE(lck); + fd_close(fsp); return NT_STATUS_INTERNAL_ERROR; } @@ -2463,6 +2465,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, } TALLOC_FREE(lck); + fd_close(fsp); if (can_access) { /* * We have detected a sharing violation here -- cgit