diff --git a/servers/slapd/init.c b/servers/slapd/init.c index 3cff69e3e6..1e54b7193b 100644 --- a/servers/slapd/init.c +++ b/servers/slapd/init.c @@ -94,6 +94,8 @@ slap_init( int mode, const char *name ) slapMode = mode; + slap_op_init(); + #ifdef SLAPD_MODULES if ( module_init() != 0 ) { slap_debug |= LDAP_DEBUG_NONE; @@ -310,8 +312,10 @@ int slap_destroy(void) } + slap_op_destroy(); + ldap_pvt_thread_destroy(); - /* should destory the above mutex */ + /* should destroy the above mutex */ return rc; } diff --git a/servers/slapd/main.c b/servers/slapd/main.c index ba368c5a7b..9dc39c9f9f 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -727,7 +727,6 @@ unhandled_option:; extops_init(); lutil_passwd_init(); - slap_op_init(); #ifdef HAVE_TLS rc = ldap_create( &slap_tls_ld ); @@ -958,8 +957,6 @@ destroy: module_kill(); #endif - slap_op_destroy(); - extops_kill(); supported_feature_destroy();