Due to the introduction of smallbuf usage for HTTP/3 headers emission,
ret variable may be used uninitialized if buffer allocation fails due to
not enough room in QUIC connection window.
Fix this by setting ret value to 0.
Function variable declaration are also adjusted so that the pattern is
similar to h3_resp_headers_send(). Finally, outbuf buffer is also
removed as it is now unused.
No need to backport.
*/
static int h3_req_headers_send(struct qcs *qcs, struct htx *htx)
{
+ int err;
struct http_hdr list[global.tune.max_http_hdr * 2];
- struct buffer outbuf;
struct buffer headers_buf = BUF_NULL;
struct buffer *res;
enum htx_blk_type type;
struct ist meth, uri, scheme = IST_NULL, auth = IST_NULL;
int frame_length_size; /* size in bytes of frame length varint field */
int smallbuf = 1;
- int ret, err, hdr;
+ int ret = 0;
+ int hdr;
TRACE_ENTER(H3_EV_TX_FRAME|H3_EV_TX_HDR, qcs->qcc->conn, qcs);