From 8e6d1b8b81e94f89027a120ea862bd5938e953c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Thu, 7 Sep 2017 17:11:57 +0200 Subject: [PATCH] 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 --- libraries/libldap/assertion.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.47.2