]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9907 Move TLS context cleanup into lload_global_destroy
authorOndřej Kuzník <ondra@mistotebe.net>
Wed, 12 Oct 2022 10:01:53 +0000 (11:01 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 13 Oct 2022 15:45:21 +0000 (15:45 +0000)
servers/lloadd/init.c
servers/lloadd/main.c

index d6e46ff626a496832d840db966bfb0e6015b619f..5607465f71a2e7d9e13e18e01b3b8a0f46fa4f6b 100644 (file)
@@ -126,6 +126,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 );
index 1c76ef3536543c3b4c0bba24f9774fd7911e64b6..b117726a91cf188dcb28cb7008721bfa584c340a 100644 (file)
@@ -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