diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 35543fab40..707971b389 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -142,7 +142,9 @@ int connections_destroy(void) ldap_pvt_thread_mutex_destroy( &connections[i].c_write_mutex ); ldap_pvt_thread_cond_destroy( &connections[i].c_write_cv ); #ifdef LDAP_SLAPI - slapi_x_free_object_extensions( SLAPI_X_EXT_CONNECTION, &connections[i] ); + if ( slapi_plugins_used ) { + slapi_x_free_object_extensions( SLAPI_X_EXT_CONNECTION, &connections[i] ); + } #endif } }