From: Kurt Zeilenga Date: Wed, 28 Apr 1999 20:33:25 +0000 (+0000) Subject: Don't destroy uninitialized connections... X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~127 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5dbb2e760f3c6bab79b4f9ede0a7541fb2518a76;p=openldap Don't destroy uninitialized connections... --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 3ee0a7d058..25bf3d468c 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -100,9 +100,11 @@ int connections_destroy(void) } for ( i = 0; i < dtblsize; i++ ) { - ldap_pvt_thread_mutex_destroy( &connections[i].c_mutex ); - ldap_pvt_thread_mutex_destroy( &connections[i].c_write_mutex ); - ldap_pvt_thread_cond_destroy( &connections[i].c_write_cv ); + if( connections[i].c_struct_state != SLAP_C_UNINITIALIZED ) { + ldap_pvt_thread_mutex_destroy( &connections[i].c_mutex ); + ldap_pvt_thread_mutex_destroy( &connections[i].c_write_mutex ); + ldap_pvt_thread_cond_destroy( &connections[i].c_write_cv ); + } free( &connections[i] ); }