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
This commit is contained in:
Côme Chilliet 2017-09-07 17:11:57 +02:00 committed by Ondřej Kuzník
parent 1273a38eda
commit 2cac3ceb03

View 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;