mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 10:39:34 -05:00
\ITS#9996 librewrite plug potential leak in ldapmap map_ldap_apply()
This commit is contained in:
parent
7f0e4ecdaa
commit
d9507a834c
1 changed files with 5 additions and 4 deletions
|
|
@ -360,11 +360,13 @@ do_bind:;
|
|||
data->lm_attrs, 0, NULL, NULL, NULL, 1, &res );
|
||||
if ( rc == LDAP_SERVER_DOWN && first_try ) {
|
||||
first_try = 0;
|
||||
if ( ldap_initialize( &ld, data->lm_url ) != LDAP_SUCCESS ) {
|
||||
if ( ldap_initialize( &ld, data->lm_url ) != LDAP_SUCCESS ) {
|
||||
rc = REWRITE_ERR;
|
||||
goto rc_return;
|
||||
}
|
||||
set_version = 1;
|
||||
ldap_msgfree( res );
|
||||
res = NULL;
|
||||
goto do_bind;
|
||||
|
||||
} else if ( rc != LDAP_SUCCESS ) {
|
||||
|
|
@ -373,7 +375,6 @@ do_bind:;
|
|||
}
|
||||
|
||||
if ( ldap_count_entries( ld, res ) != 1 ) {
|
||||
ldap_msgfree( res );
|
||||
rc = REWRITE_ERR;
|
||||
goto rc_return;
|
||||
}
|
||||
|
|
@ -408,14 +409,14 @@ do_bind:;
|
|||
}
|
||||
}
|
||||
|
||||
ldap_msgfree( res );
|
||||
|
||||
if ( val->bv_val == NULL ) {
|
||||
rc = REWRITE_ERR;
|
||||
goto rc_return;
|
||||
}
|
||||
|
||||
rc_return:;
|
||||
ldap_msgfree( res );
|
||||
|
||||
if ( data->lm_when == MAP_LDAP_EVERYTIME ) {
|
||||
if ( ld != NULL ) {
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
|
|
|
|||
Loading…
Reference in a new issue