X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-ldap%2Funbind.c;h=a5aa5f1f9245f117b8e9b1b9e73a2e7f301f0f93;hb=08059f1633bfd9d0a709761b026bdb8e4441c6e6;hp=171581df54f73dd10609dee7a0658f1b8ce1855c;hpb=0e2af54a3ffdeebe3901370683be56fcc53023b0;p=openldap diff --git a/servers/slapd/back-ldap/unbind.c b/servers/slapd/back-ldap/unbind.c index 171581df54..a5aa5f1f92 100644 --- a/servers/slapd/back-ldap/unbind.c +++ b/servers/slapd/back-ldap/unbind.c @@ -55,9 +55,8 @@ ldap_back_conn_destroy( struct ldapconn *lc, lc_curr; #ifdef NEW_LOGGING - LDAP_LOG(( "backend", LDAP_LEVEL_INFO, - "ldap_back_conn_destroy: fetching conn %ld\n", - conn->c_connid )); + LDAP_LOG( BACK_LDAP, INFO, + "ldap_back_conn_destroy: fetching conn %ld\n", conn->c_connid, 0, 0 ); #else /* !NEW_LOGGING */ Debug( LDAP_DEBUG_TRACE, "=>ldap_back_conn_destroy: fetching conn %ld\n", @@ -71,9 +70,15 @@ ldap_back_conn_destroy( ldap_pvt_thread_mutex_unlock( &li->conn_mutex ); if (lc) { +#ifdef NEW_LOGGING + LDAP_LOG( BACK_LDAP, DETAIL1, + "ldap_back_conn_destroy: destroying conn %ld\n", + conn->c_connid, 0, 0 ); +#else /* !NEW_LOGGING */ Debug( LDAP_DEBUG_TRACE, "=>ldap_back_conn_destroy: destroying conn %ld\n", lc->conn->c_connid, 0, 0 ); +#endif #ifdef ENABLE_REWRITE /* @@ -89,9 +94,12 @@ ldap_back_conn_destroy( */ ldap_unbind(lc->ld); if ( lc->bound_dn.bv_val ) { - free( lc->bound_dn.bv_val ); + ch_free( lc->bound_dn.bv_val ); + } + if ( lc->cred.bv_val ) { + ch_free( lc->cred.bv_val ); } - free( lc ); + ch_free( lc ); } /* no response to unbind */