mirror of
https://github.com/curl/curl.git
synced 2026-07-22 09:37:16 +03:00
SPNEGO: Fix memory leak when authentication fails
If SPNEGO fails, cleanup the negotiate handle right away. Fixes #1115 Signed-off-by: Isaac Boukris <iboukris@gmail.com> Reported-by: ashman-p
This commit is contained in:
parent
1299df6868
commit
46f906a1b0
1 changed files with 8 additions and 2 deletions
|
|
@ -37,6 +37,7 @@
|
|||
CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
|
||||
const char *header)
|
||||
{
|
||||
CURLcode result;
|
||||
struct Curl_easy *data = conn->data;
|
||||
size_t len;
|
||||
|
||||
|
|
@ -89,8 +90,13 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
|
|||
}
|
||||
|
||||
/* Initilise the security context and decode our challenge */
|
||||
return Curl_auth_decode_spnego_message(data, userp, passwdp, service, host,
|
||||
header, neg_ctx);
|
||||
result = Curl_auth_decode_spnego_message(data, userp, passwdp, service,
|
||||
host, header, neg_ctx);
|
||||
|
||||
if(result)
|
||||
Curl_auth_spnego_cleanup(neg_ctx);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue