]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
quiche: fix defects found in latest coverity report
authorStefan Eissing <stefan@eissing.org>
Mon, 17 Jul 2023 18:59:16 +0000 (20:59 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 17 Jul 2023 21:27:55 +0000 (23:27 +0200)
Closes #11455

lib/vquic/curl_quiche.c

index dec97b70dbcb62d550040171bc90f188ae840b0a..2aa867085de4e13d7ed72005e236b2468ff411c9 100644 (file)
@@ -425,10 +425,6 @@ static ssize_t stream_resp_read(void *reader_ctx,
     *err = CURLE_OK;
     return nread;
   }
-  else if(nread < 0) {
-    *err = CURLE_AGAIN;
-    return -1;
-  }
   else {
     *err = stream->resp_got_header? CURLE_PARTIAL_FILE : CURLE_RECV_ERROR;
     return -1;
@@ -826,7 +822,7 @@ static ssize_t cf_quiche_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
 
   if(!stream) {
     *err = CURLE_RECV_ERROR;
-    goto out;
+    return -1;
   }
 
   if(!Curl_bufq_is_empty(&stream->recvbuf)) {
@@ -911,8 +907,7 @@ static ssize_t h3_open_stream(struct Curl_cfilter *cf,
   if(!stream) {
     *err = h3_data_setup(cf, data);
     if(*err) {
-      nwritten = -1;
-      goto out;
+      return -1;
     }
     stream = H3_STREAM_CTX(data);
     DEBUGASSERT(stream);