]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Use b_alloc_small() to allocate a small buffer
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 10 Mar 2026 07:12:15 +0000 (08:12 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Mar 2026 13:02:42 +0000 (14:02 +0100)
Rely on b_alloc_small to allocate a small buffer.

src/quic_stream.c

index 407ca1efeb8a1f7980e9543262c168f9a08b6c56..a2d0020cd31642dd63f21cd2c78c450236d511a7 100644 (file)
@@ -462,16 +462,12 @@ struct buffer *qc_stream_buf_alloc(struct qc_stream_desc *stream,
                }
        }
        else {
-               char *area;
-
-               if (!(area = pool_alloc(pool_head_small_buffer))) {
+               if (!b_alloc_small(&stream->buf->buf)) {
                        pool_free(pool_head_quic_stream_buf, stream->buf);
                        stream->buf = NULL;
                        return NULL;
                }
-
                stream->buf->sbuf = 1;
-               stream->buf->buf = b_make(area, global.tune.bufsize_small, 0, 0);
        }
 
        eb64_insert(&stream->buf_tree, &stream->buf->offset_node);