aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-01-24 12:34:23 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-01-24 12:34:23 +0000
commit45bac25d90e89110f211dc41461bcdce81e74427 (patch)
treee6ea21b3dbc5a0bd22ae925dfb5e27cfb8a0d945
parent354c8dcd82fd645c5976eea20d79e5e4174bdd43 (diff)
bail out on strdup() errors
-rw-r--r--lib/http.c2
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) {