bail out on strdup() errors
This commit is contained in:
@@ -1420,6 +1420,8 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
|
|||||||
free(data->state.first_host);
|
free(data->state.first_host);
|
||||||
|
|
||||||
data->state.first_host = strdup(conn->host.name);
|
data->state.first_host = strdup(conn->host.name);
|
||||||
|
if(!data->state.first_host)
|
||||||
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(conn->protocol & PROT_HTTPS) {
|
if(conn->protocol & PROT_HTTPS) {
|
||||||
|
Reference in New Issue
Block a user