reset ld->ld_errno to avoid returning error codes of previously API calls (ITS#5762)

This commit is contained in:
Ralf Haferkamp 2008-10-21 16:17:41 +00:00
parent 09cb340f67
commit e8c1147b77
4 changed files with 4 additions and 0 deletions

View file

@ -71,6 +71,7 @@ ldap_create_page_control_value(
value->bv_val = NULL;
value->bv_len = 0;
ld->ld_errno = LDAP_SUCCESS;
if ( cookie == NULL ) {
cookie = &null_cookie;

View file

@ -304,6 +304,7 @@ ldap_create_sort_control_value(
value->bv_val = NULL;
value->bv_len = 0;
ld->ld_errno = LDAP_SUCCESS;
ber = ldap_alloc_ber_with_options( ld );
if ( ber == NULL) {

View file

@ -60,6 +60,7 @@ param_error:;
}
assert( LDAP_VALID( ld ) );
ld->ld_errno = LDAP_SUCCESS;
/* check sizes according to I.D. */
if ( sessionSourceIp == NULL ) {

View file

@ -101,6 +101,7 @@ ldap_create_vlv_control_value(
value->bv_val = NULL;
value->bv_len = 0;
ld->ld_errno = LDAP_SUCCESS;
ber = ldap_alloc_ber_with_options( ld );
if ( ber == NULL ) {