diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-01-24 12:34:23 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-01-24 12:34:23 +0000 |
commit | 45bac25d90e89110f211dc41461bcdce81e74427 (patch) | |
tree | e6ea21b3dbc5a0bd22ae925dfb5e27cfb8a0d945 | |
parent | 354c8dcd82fd645c5976eea20d79e5e4174bdd43 (diff) |
bail out on strdup() errors
-rw-r--r-- | lib/http.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c index babe3f111..89509491f 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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) { |