diff options
author | Volker Lendecke <vl@samba.org> | 2012-09-26 22:20:57 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-09-29 08:42:50 -0700 |
commit | 8b7e75b3582f288774016ab3d5d32911959da5aa (patch) | |
tree | 696278ef5d1103255b20218993be44d54d3e895d /source3/smbd | |
parent | 64c49400396847160346e65912c5048ff982764a (diff) | |
download | samba-8b7e75b3582f288774016ab3d5d32911959da5aa.tar.gz samba-8b7e75b3582f288774016ab3d5d32911959da5aa.tar.bz2 samba-8b7e75b3582f288774016ab3d5d32911959da5aa.zip |
s3: Close the now opened file descriptor in error paths
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 |