aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2016-03-13 17:09:58 +0000
committerSteve Holme <steve_holme@hotmail.com>2016-03-13 17:09:58 +0000
commit9eb158821f4b65718c449046fbf1b9268ca6e48d (patch)
tree5d63937e74f2cacea8d9e9eef235d029bc70c0f3
parentd7e3942814e0c3a24069a0888da4b2431bafe44a (diff)
negotiate: Use 'CURLcode result' for curl result codes
-rw-r--r--lib/http_negotiate_sspi.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/http_negotiate_sspi.c b/lib/http_negotiate_sspi.c
index 7371f97d0..d2643bb41 100644
--- a/lib/http_negotiate_sspi.c
+++ b/lib/http_negotiate_sspi.c
@@ -234,14 +234,14 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
char *encoded = NULL;
size_t len = 0;
char *userp;
- CURLcode error;
+ CURLcode result;
- error = Curl_base64_encode(conn->data,
- (const char*)neg_ctx->output_token,
- neg_ctx->output_token_length,
- &encoded, &len);
- if(error)
- return error;
+ result = Curl_base64_encode(conn->data,
+ (const char*)neg_ctx->output_token,
+ neg_ctx->output_token_length,
+ &encoded, &len);
+ if(result)
+ return result;
if(!len)
return CURLE_REMOTE_ACCESS_DENIED;
@@ -257,7 +257,9 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
Curl_safefree(conn->allocptr.userpwd);
conn->allocptr.userpwd = userp;
}
+
free(encoded);
+
return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK;
}