s4:ldap_server: make sure we shutdown the tls socket before stream_terminate_connecti...
authorStefan Metzmacher <metze@samba.org>
Wed, 5 Aug 2009 08:05:56 +0000 (10:05 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 5 Aug 2009 08:10:14 +0000 (10:10 +0200)
This fixes a crash bug where tls_destructor() relies on the fd event still being there.

metze

source4/ldap_server/ldap_server.c

index 72431e96690a66dd5bbc2f63d0667d25df609f14..b119620339b209a0bd1f9a69ce0115bc2138a117 100644 (file)
@@ -51,6 +51,7 @@ void ldapsrv_terminate_connection(struct ldapsrv_connection *conn,
 {
        packet_recv_disable(conn->packet);
        TALLOC_FREE(conn->packet);
+       TALLOC_FREE(conn->sockets.tls);
        stream_terminate_connection(conn->connection, reason);
 }