mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
sasl_sspi: Fix memory leak in domain populate
Free an existing domain before replacing it. Bug: https://github.com/curl/curl/issues/635 Reported-by: silveja1@users.noreply.github.com
This commit is contained in:
parent
20dcd19501
commit
742deff4dd
@ -316,6 +316,7 @@ CURLcode Curl_override_sspi_http_realm(const char *chlg,
|
|||||||
Curl_unicodefree(domain.tchar_ptr);
|
Curl_unicodefree(domain.tchar_ptr);
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
free(identity->Domain);
|
||||||
identity->Domain = dup_domain.tbyte_ptr;
|
identity->Domain = dup_domain.tbyte_ptr;
|
||||||
identity->DomainLength = curlx_uztoul(_tcslen(dup_domain.tchar_ptr));
|
identity->DomainLength = curlx_uztoul(_tcslen(dup_domain.tchar_ptr));
|
||||||
dup_domain.tchar_ptr = NULL;
|
dup_domain.tchar_ptr = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user