BUG/MEDIUM: quic: fix memleak for out-of-order crypto data
Liberate quic_enc_level ncbuf in quic_stream_free(). In most cases, this
will already be done when handshake is completed via
qc_treat_rx_crypto_frms(). However, if a connection is released before
handshake completion, a leak was present without this patch.
Under normal situation, this leak should have been limited due to the
majority of QUIC connection success on handshake. However, another bug
caused handshakes to fail too frequently, especially with chrome client.
This had the side-effect to dramatically increase this memory leak.
This should fix in part github issue #1903.
(cherry picked from commit bc174b2101
)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
This commit is contained in:
committed by
Christopher Faulet
parent
4f6e4c293b
commit
9f64b3f69e
@ -4478,6 +4478,8 @@ void quic_cstream_free(struct quic_cstream *cs)
|
||||
return;
|
||||
}
|
||||
|
||||
quic_free_ncbuf(&cs->rx.ncbuf);
|
||||
|
||||
qc_stream_desc_release(cs->desc);
|
||||
pool_free(pool_head_quic_cstream, cs);
|
||||
}
|
||||
|
Reference in New Issue
Block a user