From: Stefan Eissing Date: Mon, 17 Jul 2023 18:59:16 +0000 (+0200) Subject: quiche: fix defects found in latest coverity report X-Git-Tag: curl-8_2_0~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b105a9fd8335c08942c18bfb6ebb6c540933ef02;p=thirdparty%2Fcurl.git quiche: fix defects found in latest coverity report Closes #11455 --- diff --git a/lib/vquic/curl_quiche.c b/lib/vquic/curl_quiche.c index dec97b70db..2aa867085d 100644 --- a/lib/vquic/curl_quiche.c +++ b/lib/vquic/curl_quiche.c @@ -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);