From: Ralf Haferkamp Date: Tue, 21 Oct 2008 16:17:41 +0000 (+0000) Subject: reset ld->ld_errno to avoid returning error codes of previously API calls (ITS#5762) X-Git-Tag: ACLCHECK_0~1209 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e8c1147b77b50c9ff197c37926f57e828039bd9e;p=openldap reset ld->ld_errno to avoid returning error codes of previously API calls (ITS#5762) --- diff --git a/libraries/libldap/pagectrl.c b/libraries/libldap/pagectrl.c index 8aac0c892a..b090918bd2 100644 --- a/libraries/libldap/pagectrl.c +++ b/libraries/libldap/pagectrl.c @@ -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; diff --git a/libraries/libldap/sortctrl.c b/libraries/libldap/sortctrl.c index 80faea92e3..d5b6ac746f 100644 --- a/libraries/libldap/sortctrl.c +++ b/libraries/libldap/sortctrl.c @@ -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) { diff --git a/libraries/libldap/stctrl.c b/libraries/libldap/stctrl.c index 8aba946674..d02d2d210f 100644 --- a/libraries/libldap/stctrl.c +++ b/libraries/libldap/stctrl.c @@ -60,6 +60,7 @@ param_error:; } assert( LDAP_VALID( ld ) ); + ld->ld_errno = LDAP_SUCCESS; /* check sizes according to I.D. */ if ( sessionSourceIp == NULL ) { diff --git a/libraries/libldap/vlvctrl.c b/libraries/libldap/vlvctrl.c index d92084148e..f0acaf9102 100644 --- a/libraries/libldap/vlvctrl.c +++ b/libraries/libldap/vlvctrl.c @@ -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 ) {