From 45bac25d90e89110f211dc41461bcdce81e74427 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Jan 2007 12:34:23 +0000 Subject: bail out on strdup() errors --- lib/http.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') 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) { -- cgit v1.2.3