mirror of
https://github.com/curl/curl.git
synced 2026-04-26 04:22:13 +03:00
bail out on strdup() errors
This commit is contained in:
parent
354c8dcd82
commit
45bac25d90
1 changed files with 2 additions and 0 deletions
|
|
@ -1420,6 +1420,8 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
|
|||
free(data->state.first_host);
|
||||
|
||||
data->state.first_host = strdup(conn->host.name);
|
||||
if(!data->state.first_host)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if(conn->protocol & PROT_HTTPS) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue