mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
To be consistent, should assert that ld is valid.
This commit is contained in:
parent
d9889c28ef
commit
2ad03e6041
1 changed files with 12 additions and 9 deletions
|
|
@ -36,6 +36,9 @@ ldap_unbind_ext(
|
|||
{
|
||||
int rc;
|
||||
|
||||
assert( ld != NULL );
|
||||
assert( LDAP_VALID( ld ) );
|
||||
|
||||
/* check client controls */
|
||||
rc = ldap_int_client_controls( ld, cctrls );
|
||||
if( rc != LDAP_SUCCESS ) return rc;
|
||||
|
|
@ -72,16 +75,16 @@ ldap_ld_free(
|
|||
int err = LDAP_SUCCESS;
|
||||
LDAPRequest *lr, *nextlr;
|
||||
|
||||
/* free LDAP structure and outstanding requests/responses */
|
||||
for ( lr = ld->ld_requests; lr != NULL; lr = nextlr ) {
|
||||
nextlr = lr->lr_next;
|
||||
ldap_free_request( ld, lr );
|
||||
}
|
||||
/* free LDAP structure and outstanding requests/responses */
|
||||
for ( lr = ld->ld_requests; lr != NULL; lr = nextlr ) {
|
||||
nextlr = lr->lr_next;
|
||||
ldap_free_request( ld, lr );
|
||||
}
|
||||
|
||||
/* free and unbind from all open connections */
|
||||
while ( ld->ld_conns != NULL ) {
|
||||
ldap_free_connection( ld, ld->ld_conns, 1, close );
|
||||
}
|
||||
/* free and unbind from all open connections */
|
||||
while ( ld->ld_conns != NULL ) {
|
||||
ldap_free_connection( ld, ld->ld_conns, 1, close );
|
||||
}
|
||||
|
||||
for ( lm = ld->ld_responses; lm != NULL; lm = next ) {
|
||||
next = lm->lm_next;
|
||||
|
|
|
|||
Loading…
Reference in a new issue