summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-06-01 09:34:36 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-06-01 15:22:36 +0200
commitb77a2528f8d76f7d9878a9e3d1f7744a5becfdd4 (patch)
treee96e3d2ac469904c5dbc8c5d7c61c1d9b539e839
parent5325b92a0a3c2b29a4be03ed88c14972114774af (diff)
downloadcurl-b77a2528f8d76f7d9878a9e3d1f7744a5becfdd4.tar.gz
transfer: remove k->str NULL check
"Null-checking k->str suggests that it may be null, but it has already been dereferenced on all paths leading to the check" - and it can't legally be NULL at this point. Remove check. Detected by Coverity CID 1463884 Closes #5495
-rw-r--r--lib/transfer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index ea337ea1d..319744985 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -688,7 +688,7 @@ static CURLcode readwrite_data(struct Curl_easy *data,
/* This is not an 'else if' since it may be a rest from the header
parsing, where the beginning of the buffer is headers and the end
is non-headers. */
- if(k->str && !k->header && (nread > 0 || is_empty_data)) {
+ if(!k->header && (nread > 0 || is_empty_data)) {
if(data->set.opt_no_body) {
/* data arrives although we want none, bail out */