From: Côme Chilliet Date: Thu, 7 Sep 2017 15:11:57 +0000 (+0200) Subject: ITS#8674 Return correct result from ldap_create_assertion_control_value X-Git-Tag: OPENLDAP_REL_ENG_2_4_48~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e6d1b8b81e94f89027a120ea862bd5938e953c6;p=thirdparty%2Fopenldap.git ITS#8674 Return correct result from ldap_create_assertion_control_value ldap_create_assertion_control_value was returning ld->ld_errno upon success without reseting it to LDAP_SUCCESS first --- diff --git a/libraries/libldap/assertion.c b/libraries/libldap/assertion.c index 102513bcce..3b22a2fd53 100644 --- a/libraries/libldap/assertion.c +++ b/libraries/libldap/assertion.c @@ -31,6 +31,8 @@ ldap_create_assertion_control_value( BerElement *ber = NULL; int err; + ld->ld_errno = LDAP_SUCCESS; + if ( assertion == NULL || assertion[ 0 ] == '\0' ) { ld->ld_errno = LDAP_PARAM_ERROR; return ld->ld_errno;