mirror of
https://github.com/samba-team/samba.git
synced 2025-11-07 12:23:51 +03:00
r5193: make sure we mark the event dead when we free it on a dead connection
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
5f40ff0f55
commit
90535bab95
@@ -663,6 +663,7 @@ static void smbsrv_recv(struct stream_connection *conn, struct timeval t, uint16
|
|||||||
status = receive_smb_request(smb_conn, t);
|
status = receive_smb_request(smb_conn, t);
|
||||||
if (NT_STATUS_IS_ERR(status)) {
|
if (NT_STATUS_IS_ERR(status)) {
|
||||||
talloc_free(conn->event.fde);
|
talloc_free(conn->event.fde);
|
||||||
|
conn->event.fde = NULL;
|
||||||
smbsrv_terminate_connection(smb_conn, nt_errstr(status));
|
smbsrv_terminate_connection(smb_conn, nt_errstr(status));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,10 +97,10 @@ static void stream_new_connection(struct event_context *ev,
|
|||||||
|
|
||||||
srv_conn->private = stream_socket->private;
|
srv_conn->private = stream_socket->private;
|
||||||
srv_conn->model_ops = stream_socket->model_ops;
|
srv_conn->model_ops = stream_socket->model_ops;
|
||||||
srv_conn->event.ctx = ev;
|
|
||||||
srv_conn->socket = sock;
|
srv_conn->socket = sock;
|
||||||
srv_conn->server_id = server_id;
|
srv_conn->server_id = server_id;
|
||||||
srv_conn->ops = stream_socket->ops;
|
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),
|
srv_conn->event.fde = event_add_fd(ev, srv_conn, socket_get_fd(sock),
|
||||||
EVENT_FD_READ,
|
EVENT_FD_READ,
|
||||||
stream_io_handler, srv_conn);
|
stream_io_handler, srv_conn);
|
||||||
|
|||||||
Reference in New Issue
Block a user