summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/smb2_server.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 77f25a9a82..dcaefb1689 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1297,9 +1297,13 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
* request chain. This is not allowed.
* Cancel the outstanding request.
*/
- tevent_req_cancel(req->subreq);
+ bool ok = tevent_req_cancel(req->subreq);
+ if (ok) {
+ return NT_STATUS_OK;
+ }
+ TALLOC_FREE(req->subreq);
return smbd_smb2_request_error(req,
- NT_STATUS_INSUFFICIENT_RESOURCES);
+ NT_STATUS_INTERNAL_ERROR);
}
if (DEBUGLEVEL >= 10) {