BUG/MINOR: mux-quic: support nul buffer with qc_free_ncbuf()
qc_free_ncbuf() may now be used with a NCBUF_NULL buffer as parameter. This is useful when using this function on a QCS with no allocated buffer. This case was not reproduced for the moment, but it will soon become more present as buffers will be released if emptied. Also a call to offer_buffers() is added to conform with the dynamic buffer management of haproxy.
This commit is contained in:
parent
c830e1e904
commit
7313f5ee7e
@ -189,8 +189,12 @@ static void qc_free_ncbuf(struct qcs *qcs, struct ncbuf *ncbuf)
|
||||
{
|
||||
struct buffer buf;
|
||||
|
||||
if (ncb_is_null(ncbuf))
|
||||
return;
|
||||
|
||||
buf = b_make(ncbuf->area, ncbuf->size, 0, 0);
|
||||
b_free(&buf);
|
||||
offer_buffers(NULL, 1);
|
||||
|
||||
*ncbuf = NCBUF_NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user