From: Ondřej Kuzník Date: Wed, 12 Oct 2022 10:01:53 +0000 (+0100) Subject: ITS#9907 Move TLS context cleanup into lload_global_destroy X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13d9c925dd8bed3c6b54f49bf144482ff407254f;p=thirdparty%2Fopenldap.git ITS#9907 Move TLS context cleanup into lload_global_destroy --- diff --git a/servers/lloadd/init.c b/servers/lloadd/init.c index 1809557099..b86c4fd1bd 100644 --- a/servers/lloadd/init.c +++ b/servers/lloadd/init.c @@ -124,6 +124,9 @@ lload_global_destroy( void ) if ( lload_tls_ld ) { ldap_unbind_ext( lload_tls_ld, NULL, NULL ); } + if ( lload_tls_ctx ) { + ldap_pvt_tls_ctx_free( lload_tls_ctx ); + } #endif ldap_pvt_thread_mutex_destroy( &lload_wait_mutex ); diff --git a/servers/lloadd/main.c b/servers/lloadd/main.c index 1c76ef3536..b117726a91 100644 --- a/servers/lloadd/main.c +++ b/servers/lloadd/main.c @@ -890,10 +890,6 @@ stop: lloadd_daemon_destroy(); #ifdef HAVE_TLS - if ( lload_tls_ld ) { - ldap_pvt_tls_ctx_free( lload_tls_ctx ); - ldap_unbind_ext( lload_tls_ld, NULL, NULL ); - } ldap_pvt_tls_destroy(); #endif