mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 09:21:50 -05:00
http: add missing return code check
Detected by Coverity. CID 1439610. Follow-up from 46e164069d1a523 Closes #3034
This commit is contained in:
parent
30b2d07b03
commit
e407e79c29
@ -2453,8 +2453,6 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
||||
if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) {
|
||||
char *url = data->change.url;
|
||||
result = Curl_add_buffer(&req_buffer, url, strlen(url));
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
else if(paste_ftp_userpwd)
|
||||
result = Curl_add_bufferf(&req_buffer, "ftp://%s:%s@%s",
|
||||
@ -2464,12 +2462,11 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
||||
result = Curl_add_buffer(&req_buffer, path, strlen(path));
|
||||
if(result)
|
||||
return result;
|
||||
if(query) {
|
||||
if(query)
|
||||
result = Curl_add_bufferf(&req_buffer, "?%s", query);
|
||||
}
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
result =
|
||||
Curl_add_bufferf(&req_buffer,
|
||||
|
Loading…
x
Reference in New Issue
Block a user