mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-14 15:34:35 +00:00
BUG/MINOR: fix memleak on quic-conn streams cleaning
When freeing a quic-conn, the streams resources attached to it must be cleared. This code is already implemented but the streams buffer was not deallocated. Fix this by using the function qc_stream_desc_free. This existing function centralize all operations to properly free all streams elements, attached both to the MUX and the quic-conn. This fixes a memory leak which can happen for each released connection.
This commit is contained in:
parent
6057b4090e
commit
c9acc31018
@ -3808,8 +3808,11 @@ static void quic_conn_release(struct quic_conn *qc)
|
||||
stream = eb64_entry(node, struct qc_stream_desc, by_id);
|
||||
node = eb64_next(node);
|
||||
|
||||
eb64_delete(&stream->by_id);
|
||||
pool_free(pool_head_quic_conn_stream, stream);
|
||||
/* all streams attached to the quic-conn are released, so
|
||||
* qc_stream_desc_free will liberate the stream instance.
|
||||
*/
|
||||
BUG_ON(!stream->release);
|
||||
qc_stream_desc_free(stream);
|
||||
}
|
||||
|
||||
if (qc->idle_timer_task) {
|
||||
|
Loading…
Reference in New Issue
Block a user