This is a follow up to the parent commit
dcdd4be which fixes one leak
but creates another by failing to free the credentials handle if out of
memory. Also there's a second location a few lines down where we fail to
do same. This commit fixes both of those issues.
by the security package */
output_token = malloc(token_max);
if(!output_token) {
+ s_pSecFn->FreeCredentialsHandle(&credentials);
+
Curl_sspi_free_identity(p_identity);
+
return CURLE_OUT_OF_MEMORY;
}
spn = Curl_convert_UTF8_to_tchar((char *) uripath);
if(!spn) {
+ s_pSecFn->FreeCredentialsHandle(&credentials);
+
Curl_sspi_free_identity(p_identity);
free(output_token);