mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 18:19:52 -05:00
ITS#5518,#5525 cleanup ld_defconn if it was freed
This commit is contained in:
parent
ffffa52470
commit
96550c885d
1 changed files with 5 additions and 0 deletions
|
|
@ -631,6 +631,9 @@ ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind )
|
|||
} else {
|
||||
prevlc->lconn_next = tmplc->lconn_next;
|
||||
}
|
||||
if ( ld->ld_defconn == lc ) {
|
||||
ld->ld_defconn = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
prevlc = tmplc;
|
||||
|
|
@ -675,6 +678,8 @@ ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind )
|
|||
|
||||
if ( lc->lconn_sb != ld->ld_sb ) {
|
||||
ber_sockbuf_free( lc->lconn_sb );
|
||||
} else {
|
||||
ber_int_sb_close( lc->lconn_sb );
|
||||
}
|
||||
|
||||
if ( lc->lconn_rebind_queue != NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue