Skip to content

Commit

Permalink
lib-ldap: Fixed assert-crash when killing LDAP connection.
Browse files Browse the repository at this point in the history
libldap may have already closed the fd, so with epoll io_remove() would
try to remove it and crash with:

Panic: epoll_ctl(del, 12) failed: Bad file descriptor
  • Loading branch information
sirainen authored and GitLab committed May 16, 2016
1 parent d3b0b5d commit 2a444bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-ldap/ldap-connection.c
Expand Up @@ -552,7 +552,7 @@ int ldap_connection_connect(struct ldap_connection *conn)
void ldap_connection_kill(struct ldap_connection *conn)
{
if (conn->io != NULL)
io_remove(&(conn->io));
io_remove_closed(&(conn->io));
if (conn->to_disconnect != NULL)
timeout_remove(&(conn->to_disconnect));
if (conn->to_reconnect != NULL)
Expand Down

0 comments on commit 2a444bf

Please sign in to comment.