From: Kurt Zeilenga Date: Tue, 12 Oct 1999 18:51:36 +0000 (+0000) Subject: Force sd close. Suggested by rajk@home.com X-Git-Tag: UCDATA_2_4~346 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=60d00d4649a0af1772ac8a676e67e7925c553571;p=openldap Force sd close. Suggested by rajk@home.com --- diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 6e4174e936..aeb32ef92b 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -410,12 +410,16 @@ ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ) if ( unbind ) { ldap_send_unbind( ld, lc->lconn_sb, NULL, NULL ); } - ldap_close_connection( lc->lconn_sb ); - ber_pvt_sb_destroy( lc->lconn_sb ); - if( lc->lconn_ber != NULL ) { - ber_free( lc->lconn_ber, 1 ); - } } + + /* force closure */ + ldap_close_connection( lc->lconn_sb ); + ber_pvt_sb_destroy( lc->lconn_sb ); + + if( lc->lconn_ber != NULL ) { + ber_free( lc->lconn_ber, 1 ); + } + prevlc = NULL; for ( tmplc = ld->ld_conns; tmplc != NULL; tmplc = tmplc->lconn_next ) {