]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
bail out on strdup() errors
authorDaniel Stenberg <daniel@haxx.se>
Wed, 24 Jan 2007 12:34:23 +0000 (12:34 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 24 Jan 2007 12:34:23 +0000 (12:34 +0000)
lib/http.c

index babe3f11125adb4ea557ac802a5d81d5c6195402..89509491fcdaaf4ef3be394ca013c71672eb4b24 100644 (file)
@@ -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) {