mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Fix destruct sequencing
This commit is contained in:
parent
056b193ed7
commit
571ac24b33
@ -111,8 +111,10 @@ static void tls_init_threads( void )
|
|||||||
void
|
void
|
||||||
ldap_int_tls_destroy( struct ldapoptions *lo )
|
ldap_int_tls_destroy( struct ldapoptions *lo )
|
||||||
{
|
{
|
||||||
SSL_CTX_free( lo->ldo_tls_ctx );
|
if ( lo->ldo_tls_ctx ) {
|
||||||
lo->ldo_tls_ctx = NULL;
|
SSL_CTX_free( lo->ldo_tls_ctx );
|
||||||
|
lo->ldo_tls_ctx = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if ( lo->ldo_tls_certfile ) {
|
if ( lo->ldo_tls_certfile ) {
|
||||||
LDAP_FREE( lo->ldo_tls_certfile );
|
LDAP_FREE( lo->ldo_tls_certfile );
|
||||||
@ -146,6 +148,10 @@ ldap_int_tls_destroy( struct ldapoptions *lo )
|
|||||||
void
|
void
|
||||||
ldap_pvt_tls_destroy( void )
|
ldap_pvt_tls_destroy( void )
|
||||||
{
|
{
|
||||||
|
struct ldapoptions *lo = LDAP_INT_GLOBAL_OPT();
|
||||||
|
|
||||||
|
ldap_int_tls_destroy( lo );
|
||||||
|
|
||||||
EVP_cleanup();
|
EVP_cleanup();
|
||||||
ERR_remove_state(0);
|
ERR_remove_state(0);
|
||||||
ERR_free_strings();
|
ERR_free_strings();
|
||||||
|
Loading…
Reference in New Issue
Block a user