r14937: fix a crash that can be caused by a notify triggering during a share
authorAndrew Tridgell <tridge@samba.org>
Thu, 6 Apr 2006 02:03:19 +0000 (02:03 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:00:19 +0000 (14:00 -0500)
disconnect

source/smb_server/smb/request.c

index e858b2b7872375c7e0a0be01adfa2122e1cb6ea9..f266ab587bfbe738afea61373ea20b0e8125d1a9 100644 (file)
@@ -278,6 +278,11 @@ void smbsrv_send_reply_nosign(struct smbsrv_request *req)
        DATA_BLOB blob;
        NTSTATUS status;
 
+       if (req->smb_conn->connection->event.fde == NULL) {
+               /* we are in the process of shutting down this connection */
+               return;
+       }
+
        if (req->out.size > NBT_HDR_SIZE) {
                _smb_setlen(req->out.buffer, req->out.size - NBT_HDR_SIZE);
        }