]> git.sur5r.net Git - openldap/commitdiff
schema_destroy(): Handle failed slap_schema_init()
authorHallvard Furuseth <hallvard@openldap.org>
Thu, 13 Apr 2006 22:19:19 +0000 (22:19 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Thu, 13 Apr 2006 22:19:19 +0000 (22:19 +0000)
servers/slapd/schema_init.c

index 39952664dbf8966fed66c3c3eb3010e40d704141..fe237767a4ec85d2adb273a7b599d26ca296eafa 100644 (file)
@@ -4681,6 +4681,8 @@ schema_destroy( void )
        mru_destroy();
        syn_destroy();
 
-       ldap_pvt_thread_mutex_destroy( &ad_undef_mutex );
-       ldap_pvt_thread_mutex_destroy( &oc_undef_mutex );
+       if( schema_init_done ) {
+               ldap_pvt_thread_mutex_destroy( &ad_undef_mutex );
+               ldap_pvt_thread_mutex_destroy( &oc_undef_mutex );
+       }
 }