mirror of
https://github.com/samba-team/samba.git
synced 2025-11-09 20:23:51 +03:00
r25692: fixed another example where the free of fde and the free of the socket
causes the fd to be closed before epoll is told
This commit is contained in:
committed by
Stefan Metzmacher
parent
f61a9b7068
commit
d19686cf8a
@@ -366,12 +366,14 @@ static void ldap_connect_got_sock(struct composite_context *ctx, struct ldap_con
|
||||
/* setup a handler for events on this socket */
|
||||
conn->event.fde = event_add_fd(conn->event.event_ctx, conn->sock,
|
||||
socket_get_fd(conn->sock),
|
||||
EVENT_FD_READ, ldap_io_handler, conn);
|
||||
EVENT_FD_READ | EVENT_FD_AUTOCLOSE, ldap_io_handler, conn);
|
||||
if (conn->event.fde == NULL) {
|
||||
composite_error(ctx, NT_STATUS_INTERNAL_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
socket_set_flags(conn->sock, SOCKET_FLAG_NOCLOSE);
|
||||
|
||||
talloc_steal(conn, conn->sock);
|
||||
if (conn->ldaps) {
|
||||
struct socket_context *tls_socket = tls_init_client(conn->sock, conn->event.fde);
|
||||
|
||||
Reference in New Issue
Block a user