mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
fix yet another leak
This commit is contained in:
parent
c8ef1e1861
commit
efe74fbae0
3 changed files with 19 additions and 18 deletions
|
|
@ -276,9 +276,10 @@ retry_lock:;
|
||||||
msc->msc_ld = NULL;
|
msc->msc_ld = NULL;
|
||||||
msc->msc_bound = 0;
|
msc->msc_bound = 0;
|
||||||
|
|
||||||
/* mc here must be the regular mc, reset and ready for init */
|
/* mc here must be the regular mc,
|
||||||
rc = meta_back_init_one_conn( op, rs, mt, msc,
|
* reset and ready for init */
|
||||||
LDAP_BACK_DONTSEND );
|
rc = meta_back_init_one_conn( op, rs,
|
||||||
|
mt, msc, LDAP_BACK_DONTSEND );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* can't do anything about it */
|
/* can't do anything about it */
|
||||||
|
|
@ -448,8 +449,10 @@ retry_lock:;
|
||||||
msc->msc_ld = NULL;
|
msc->msc_ld = NULL;
|
||||||
msc->msc_bound = 0;
|
msc->msc_bound = 0;
|
||||||
|
|
||||||
/* mc here must be the regular mc, reset and ready for init */
|
/* mc here must be the regular mc,
|
||||||
rc = meta_back_init_one_conn( op, rs, mt, msc, LDAP_BACK_DONTSEND );
|
* reset and ready for init */
|
||||||
|
rc = meta_back_init_one_conn( op, rs,
|
||||||
|
mt, msc, LDAP_BACK_DONTSEND );
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -217,8 +217,7 @@ meta_back_init_one_conn(
|
||||||
* Already init'ed
|
* Already init'ed
|
||||||
*/
|
*/
|
||||||
if ( msc->msc_ld != NULL ) {
|
if ( msc->msc_ld != NULL ) {
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
return rs->sr_err = LDAP_SUCCESS;
|
||||||
goto error_return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -242,14 +241,14 @@ meta_back_init_one_conn(
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_TLS
|
#ifdef HAVE_TLS
|
||||||
/* start TLS ("start-tls"/"try-start-tls" statements) */
|
/* start TLS ("tls [try-]{start|propagate}" statement) */
|
||||||
if ( ( LDAP_BACK_USE_TLS( mi ) || ( op->o_conn->c_is_tls && LDAP_BACK_PROPAGATE_TLS( mi ) ) )
|
if ( ( LDAP_BACK_USE_TLS( mi ) || ( op->o_conn->c_is_tls && LDAP_BACK_PROPAGATE_TLS( mi ) ) )
|
||||||
&& !ldap_is_ldaps_url( mt->mt_uri ) )
|
&& !ldap_is_ldaps_url( mt->mt_uri ) )
|
||||||
{
|
{
|
||||||
#ifdef SLAP_STARTTLS_ASYNCHRONOUS
|
#ifdef SLAP_STARTTLS_ASYNCHRONOUS
|
||||||
/*
|
/*
|
||||||
* use asynchronous StartTLS
|
* use asynchronous StartTLS; in case, chase referral
|
||||||
* in case, chase referral (not implemented yet)
|
* FIXME: OpenLDAP does not return referral on StartTLS yet
|
||||||
*/
|
*/
|
||||||
int msgid;
|
int msgid;
|
||||||
|
|
||||||
|
|
@ -345,11 +344,6 @@ retry:;
|
||||||
(void *)&network_timeout );
|
(void *)&network_timeout );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Sets a cookie for the rewrite session
|
|
||||||
*/
|
|
||||||
( void )rewrite_session_init( mt->mt_rwmap.rwm_rw, op->o_conn );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the connection DN is not null, an attempt to rewrite it is made
|
* If the connection DN is not null, an attempt to rewrite it is made
|
||||||
*/
|
*/
|
||||||
|
|
@ -382,7 +376,13 @@ retry:;
|
||||||
msc->msc_bound = META_UNBOUND;
|
msc->msc_bound = META_UNBOUND;
|
||||||
|
|
||||||
error_return:;
|
error_return:;
|
||||||
if ( rs->sr_err != LDAP_SUCCESS ) {
|
if ( rs->sr_err == LDAP_SUCCESS ) {
|
||||||
|
/*
|
||||||
|
* Sets a cookie for the rewrite session
|
||||||
|
*/
|
||||||
|
( void )rewrite_session_init( mt->mt_rwmap.rwm_rw, op->o_conn );
|
||||||
|
|
||||||
|
} else {
|
||||||
rs->sr_err = slap_map_api2result( rs );
|
rs->sr_err = slap_map_api2result( rs );
|
||||||
if ( sendok & LDAP_BACK_SENDERR ) {
|
if ( sendok & LDAP_BACK_SENDERR ) {
|
||||||
send_ldap_result( op, rs );
|
send_ldap_result( op, rs );
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,6 @@ retry_lock:;
|
||||||
rewrite_session_delete( mi->mi_targets[ i ].mt_rwmap.rwm_rw, conn );
|
rewrite_session_delete( mi->mi_targets[ i ].mt_rwmap.rwm_rw, conn );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no response to unbind */
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue