summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c3
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