mirror of
https://github.com/curl/curl.git
synced 2026-07-27 18:18:54 +03:00
NTLM: fix several NTLM code paths memory leaks
This commit is contained in:
parent
8ec2cb5544
commit
acafe9c160
3 changed files with 16 additions and 13 deletions
|
|
@ -1739,8 +1739,11 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||
conn->bits.authneg = FALSE;
|
||||
|
||||
Curl_safefree(conn->allocptr.ref);
|
||||
if(data->change.referer && !Curl_checkheaders(data, "Referer:"))
|
||||
if(data->change.referer && !Curl_checkheaders(data, "Referer:")) {
|
||||
conn->allocptr.ref = aprintf("Referer: %s\r\n", data->change.referer);
|
||||
if(!conn->allocptr.ref)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
else
|
||||
conn->allocptr.ref = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue