From: Pierangelo Masarati Date: Wed, 29 Jun 2005 11:44:11 +0000 (+0000) Subject: (partial?) fix ITS#3808 X-Git-Tag: OPENLDAP_AC_BP~491 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=196af0e056695f4977d62d5ca47a8aea5ce07e01;p=openldap (partial?) fix ITS#3808 --- diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index ce991e476c..b817be965a 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -212,14 +212,21 @@ int ldap_back_freeconn( Operation *op, struct ldapconn *lc ) { struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private; + int rc = 0; ldap_pvt_thread_mutex_lock( &li->conn_mutex ); lc = avl_delete( &li->conntree, (caddr_t)lc, ldap_back_conn_cmp ); - ldap_back_conn_free( (void *)lc ); + if ( lc == NULL ) { + /* something BAD happened */ + rc = -1; + + } else { + ldap_back_conn_free( (void *)lc ); + } ldap_pvt_thread_mutex_unlock( &li->conn_mutex ); - return 0; + return rc; } static int