mirror of
https://github.com/curl/curl.git
synced 2026-06-29 18:06:02 +03:00
http_proxy.c: fix OOM handling
This commit is contained in:
parent
862bb7bade
commit
0c8e36c18a
1 changed files with 4 additions and 1 deletions
|
|
@ -128,12 +128,15 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
|
|||
aprintf("%s%s%s:%hu", conn->bits.ipv6_ip?"[":"",
|
||||
hostname, conn->bits.ipv6_ip?"]":"",
|
||||
remote_port);
|
||||
if(!hostheader)
|
||||
if(!hostheader) {
|
||||
free(req_buffer);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if(!Curl_checkheaders(data, "Host:")) {
|
||||
host = aprintf("Host: %s\r\n", hostheader);
|
||||
if(!host) {
|
||||
free(hostheader);
|
||||
free(req_buffer);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue