From: Daniel Stenberg Date: Wed, 24 Jan 2007 12:34:23 +0000 (+0000) Subject: bail out on strdup() errors X-Git-Tag: curl-7_16_1~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=45bac25d90e89110f211dc41461bcdce81e74427;p=thirdparty%2Fcurl.git bail out on strdup() errors --- diff --git a/lib/http.c b/lib/http.c index babe3f1112..89509491fc 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) {