From a097414ed25873cbcbee48f0a888d36a6b60c10c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 3 Feb 2005 08:20:31 +0000 Subject: r5193: make sure we mark the event dead when we free it on a dead connection (This used to be commit 90535bab957ddaa7bfcdf43e199581f3352bdc8a) --- source4/smb_server/smb_server.c | 1 + source4/smbd/service_stream.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index 5220df034c..f1f73014f1 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -663,6 +663,7 @@ static void smbsrv_recv(struct stream_connection *conn, struct timeval t, uint16 status = receive_smb_request(smb_conn, t); if (NT_STATUS_IS_ERR(status)) { talloc_free(conn->event.fde); + conn->event.fde = NULL; smbsrv_terminate_connection(smb_conn, nt_errstr(status)); return; } diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c index 60a4c5feca..00fd9c470a 100644 --- a/source4/smbd/service_stream.c +++ b/source4/smbd/service_stream.c @@ -97,10 +97,10 @@ static void stream_new_connection(struct event_context *ev, srv_conn->private = stream_socket->private; srv_conn->model_ops = stream_socket->model_ops; - srv_conn->event.ctx = ev; srv_conn->socket = sock; srv_conn->server_id = server_id; srv_conn->ops = stream_socket->ops; + srv_conn->event.ctx = ev; srv_conn->event.fde = event_add_fd(ev, srv_conn, socket_get_fd(sock), EVENT_FD_READ, stream_io_handler, srv_conn); -- cgit