Skip to content
Snippets Groups Projects
Commit c129744f authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

Don't call NSS_Shutdown if someone else init'd the library

parent 075604f5
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,8 @@ static const PRIOMethods tlsm_PR_methods;
extern tls_impl ldap_int_tls_impl;
static int tslm_did_init;
#ifdef LDAP_R_COMPILE
static void
......@@ -81,6 +83,8 @@ tlsm_init( void )
tlsm_layer_id = PR_GetUniqueIdentity("OpenLDAP");
if ( !NSS_IsInitialized() ) {
tlsm_did_init = 1;
NSS_NoDB_Init("");
NSS_SetDomesticPolicy();
......@@ -97,7 +101,12 @@ tlsm_init( void )
static void
tlsm_destroy( void )
{
NSS_Shutdown();
/* Only if we did the actual initialization */
if ( tlsm_did_init ) {
tlsm_did_init = 0;
NSS_Shutdown();
}
PR_Cleanup();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment