sasl_sspi: Fixed a memory leak with the GSSAPI base-64 decoded challenge
This commit is contained in:
parent
437b9ba46f
commit
23d52ca4a7
@ -416,8 +416,11 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
|
|||||||
&resp_desc, &attrs,
|
&resp_desc, &attrs,
|
||||||
&tsDummy);
|
&tsDummy);
|
||||||
|
|
||||||
if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED)
|
if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
|
||||||
|
Curl_safefree(chlg);
|
||||||
|
|
||||||
return CURLE_RECV_ERROR;
|
return CURLE_RECV_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
if(memcmp(&context, krb5->context, sizeof(context))) {
|
if(memcmp(&context, krb5->context, sizeof(context))) {
|
||||||
s_pSecFn->DeleteSecurityContext(krb5->context);
|
s_pSecFn->DeleteSecurityContext(krb5->context);
|
||||||
@ -431,6 +434,9 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
|
|||||||
resp_buf.cbBuffer, outptr, outlen);
|
resp_buf.cbBuffer, outptr, outlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Free the decoded challenge */
|
||||||
|
Curl_safefree(chlg);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user