summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/smb_server/request.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c
index c690494d58..17c6d0329c 100644
--- a/source4/smb_server/request.c
+++ b/source4/smb_server/request.c
@@ -368,6 +368,11 @@ void req_setup_error(struct smbsrv_request *req, NTSTATUS status)
*/
void req_reply_error(struct smbsrv_request *req, NTSTATUS status)
{
+ if (req->smb_conn->connection->event.fde == NULL) {
+ /* the socket has been destroyed - no point trying to send an error! */
+ talloc_free(req);
+ return;
+ }
req_setup_reply(req, 0, 0);
/* error returns never have any data */