From 5dbb2e760f3c6bab79b4f9ede0a7541fb2518a76 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 28 Apr 1999 20:33:25 +0000 Subject: [PATCH] Don't destroy uninitialized connections... --- servers/slapd/connection.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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] ); } -- 2.39.5