summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/close.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 095feecf204..9c9217b177a 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -1081,6 +1081,8 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
if (lck == NULL) {
DEBUG(0, ("close_directory: Could not get share mode lock for "
"%s\n", fsp_str_dbg(fsp)));
+ close_filestruct(fsp);
+ file_free(req, fsp);
return NT_STATUS_INVALID_PARAMETER;
}
@@ -1164,6 +1166,8 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
if (!NT_STATUS_IS_OK(status)) {
DEBUG(5, ("delete_all_streams failed: %s\n",
nt_errstr(status)));
+ close_filestruct(fsp);
+ file_free(req, fsp);
return status;
}
}