Commit 45bac25d authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

bail out on strdup() errors

parent 354c8dcd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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) {