]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8674 Return correct result from ldap_create_assertion_control_value
authorCôme Chilliet <come@opensides.be>
Thu, 7 Sep 2017 15:11:57 +0000 (17:11 +0200)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 13 Jun 2019 18:42:03 +0000 (18:42 +0000)
ldap_create_assertion_control_value was returning ld->ld_errno
 upon success without reseting it to LDAP_SUCCESS first

libraries/libldap/assertion.c

index 102513bcceb988aacc500397fca41a86548e9c6c..3b22a2fd53d065362e5c99faffdfd77e155a5df0 100644 (file)
@@ -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;