diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-09-22 22:32:47 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-09-23 23:08:39 +0200 |
commit | e407e79c2937b6710ac823f64f36ac0c622f33ce (patch) | |
tree | 52dad449a52f965d72e9ac64b0fc9cafe4aa0d37 /lib | |
parent | 30b2d07b033496931687023a559601486a8113f5 (diff) | |
download | curl-e407e79c2937b6710ac823f64f36ac0c622f33ce.tar.gz |
http: add missing return code check
Detected by Coverity. CID 1439610.
Follow-up from 46e164069d1a523
Closes #3034
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/http.c b/lib/http.c index f6b24f0d5..02ba13340 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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; - } } + if(result) + return result; result = Curl_add_bufferf(&req_buffer, |