From 60d00d4649a0af1772ac8a676e67e7925c553571 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 12 Oct 1999 18:51:36 +0000 Subject: [PATCH] Force sd close. Suggested by rajk@home.com --- libraries/libldap/request.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 ) { -- 2.39.5