changeset 20180:c2248a8c82f5

lib-ldap: Fixed assert-crash when killing LDAP connection. 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
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 12 May 2016 17:45:34 -0400
parents f5a86453b6ac
children 0d829b4f73d0
files src/lib-ldap/ldap-connection.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-ldap/ldap-connection.c	Mon Feb 08 18:32:10 2016 +0200
+++ b/src/lib-ldap/ldap-connection.c	Thu May 12 17:45:34 2016 -0400
@@ -552,7 +552,7 @@
 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)