mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-11 01:41:49 -04:00
MINOR: quic: Use b_alloc_small() to allocate a small buffer
Rely on b_alloc_small to allocate a small buffer.
This commit is contained in:
parent
f8c96bf9cb
commit
01b9b67d5c
1 changed files with 1 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue