BUG/MEDIUM: quic: properly clean frames on stream free
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 15 Apr 2022 09:47:03 +0000 (11:47 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 15 Apr 2022 11:45:28 +0000 (13:45 +0200)
commitf7ff9cbfe123131d9ffa215d5cfca9a5357d1b6d
treee27f3c7e832ccc2397ced2a0427437125602a0a0
parent2bb5edcf19cc0666464a91b5f13070dd8af2a415
BUG/MEDIUM: quic: properly clean frames on stream free

A released qc_stream_desc is freed as soon as all its buffer content has
been acknowledged. However, it may still contains other frames waiting
for ACK pointing to deleted buffer content. This can happen on
retransmission.

When freeing a qc_stream_desc, free all its frames in acked_frms tree to
fix memory leak. This may also possibly fix a crash on retransmission.
Now, the frames are properly removed from a packet. This ensure we do
not retransmit a frame whose buffer is deallocated.
src/xprt_quic.c