Hans Leidekker (@hans) commented about dlls/wldap32/option.c:
BOOL turn_on;char *uri, *new_uri;if (value == WLDAP32_LDAP_OPT_ON)turn_on = TRUE;else if (value == WLDAP32_LDAP_OPT_OFF)turn_on = FALSE;else if (*(ULONG *)value == 1)turn_on = TRUE;else if (*(ULONG *)value == 0)turn_on = FALSE;elsereturn WLDAP32_LDAP_PARAM_ERROR;ret = ldap_get_option( CTX(ld), LDAP_OPT_URI, &uri );if (ret != LDAP_SUCCESS) return ret;
You should use map_error() here.