mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
ldap: Prefer 'CURLcode result' for curl result codes
This commit is contained in:
parent
d4b540f85a
commit
23bb054129
14
lib/ldap.c
14
lib/ldap.c
@ -459,17 +459,17 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
|
|||||||
if((attr_len > 7) &&
|
if((attr_len > 7) &&
|
||||||
(strcmp(";binary", (char *) attribute + (attr_len - 7)) == 0)) {
|
(strcmp(";binary", (char *) attribute + (attr_len - 7)) == 0)) {
|
||||||
/* Binary attribute, encode to base64. */
|
/* Binary attribute, encode to base64. */
|
||||||
CURLcode error = Curl_base64_encode(data,
|
result = Curl_base64_encode(data,
|
||||||
vals[i]->bv_val,
|
vals[i]->bv_val,
|
||||||
vals[i]->bv_len,
|
vals[i]->bv_len,
|
||||||
&val_b64,
|
&val_b64,
|
||||||
&val_b64_sz);
|
&val_b64_sz);
|
||||||
if(error) {
|
if(result) {
|
||||||
ldap_value_free_len(vals);
|
ldap_value_free_len(vals);
|
||||||
ldap_memfree(attribute);
|
ldap_memfree(attribute);
|
||||||
if(ber)
|
if(ber)
|
||||||
ber_free(ber, 0);
|
ber_free(ber, 0);
|
||||||
result = error;
|
|
||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user