reset passwords before freeindg them

This commit is contained in:
Pierangelo Masarati 2003-04-18 10:02:43 +00:00
parent 7de67df355
commit 6bcbe9ad31
2 changed files with 4 additions and 1 deletions

View File

@ -106,8 +106,10 @@ ldap_back_bind(
mdn.bv_val = NULL;
if ( li->savecred ) {
if ( lc->cred.bv_val )
if ( lc->cred.bv_val ) {
memset( lc->cred.bv_val, 0, lc->cred.bv_len );
ch_free( lc->cred.bv_val );
}
ber_dupbv( &lc->cred, &op->oq_bind.rb_cred );
ldap_set_rebind_proc( lc->ld, ldap_back_rebind, lc );
}

View File

@ -147,6 +147,7 @@ ldap_back_conn_free(
ch_free( lc->bound_dn.bv_val );
}
if ( lc->cred.bv_val ) {
memset( lc->cred.bv_val, 0, lc->cred.bv_len );
ch_free( lc->cred.bv_val );
}
if ( lc->local_dn.bv_val ) {