fix yet another leak

This commit is contained in:
Pierangelo Masarati 2005-07-19 11:16:24 +00:00
parent c8ef1e1861
commit efe74fbae0
3 changed files with 19 additions and 18 deletions

View File

@ -276,9 +276,10 @@ retry_lock:;
msc->msc_ld = NULL;
msc->msc_bound = 0;
/* mc here must be the regular mc, reset and ready for init */
rc = meta_back_init_one_conn( op, rs, mt, msc,
LDAP_BACK_DONTSEND );
/* mc here must be the regular mc,
* reset and ready for init */
rc = meta_back_init_one_conn( op, rs,
mt, msc, LDAP_BACK_DONTSEND );
} else {
/* can't do anything about it */
@ -448,8 +449,10 @@ retry_lock:;
msc->msc_ld = NULL;
msc->msc_bound = 0;
/* mc here must be the regular mc, reset and ready for init */
rc = meta_back_init_one_conn( op, rs, mt, msc, LDAP_BACK_DONTSEND );
/* mc here must be the regular mc,
* reset and ready for init */
rc = meta_back_init_one_conn( op, rs,
mt, msc, LDAP_BACK_DONTSEND );
} else {

View File

@ -217,8 +217,7 @@ meta_back_init_one_conn(
* Already init'ed
*/
if ( msc->msc_ld != NULL ) {
rs->sr_err = LDAP_SUCCESS;
goto error_return;
return rs->sr_err = LDAP_SUCCESS;
}
/*
@ -242,14 +241,14 @@ meta_back_init_one_conn(
}
#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 ) ) )
&& !ldap_is_ldaps_url( mt->mt_uri ) )
{
#ifdef SLAP_STARTTLS_ASYNCHRONOUS
/*
* use asynchronous StartTLS
* in case, chase referral (not implemented yet)
* use asynchronous StartTLS; in case, chase referral
* FIXME: OpenLDAP does not return referral on StartTLS yet
*/
int msgid;
@ -345,11 +344,6 @@ retry:;
(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
*/
@ -382,7 +376,13 @@ retry:;
msc->msc_bound = META_UNBOUND;
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 );
if ( sendok & LDAP_BACK_SENDERR ) {
send_ldap_result( op, rs );

View File

@ -90,8 +90,6 @@ retry_lock:;
rewrite_session_delete( mi->mi_targets[ i ].mt_rwmap.rwm_rw, conn );
}
/* no response to unbind */
return 0;
}