BUG/MINOR: quic: avoid leaking post handshake frames
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 17 Oct 2024 05:38:14 +0000 (07:38 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 23 Oct 2024 15:22:13 +0000 (17:22 +0200)
commitb47a34ce8dcba5f6ead65dff98eeea41161f01f1
treedb21b4207cebe37c708fd391679faae521c0cf68
parent11ba718b691d367d8a6ccc6c5cbd88f1de1bae36
BUG/MINOR: quic: avoid leaking post handshake frames

This bug came with this commit:
f627b92 BUG/MEDIUM: quic: always validate sender address on 0-RTT
If an error happens in quic_build_post_handshake_frames() during the
code exexuted for th NEW_TOKEN frame allocation, some could leak because
of the wrong label used to interrupt this function asap.
Replace the "goto leave" by "goto err" to deallocated such frames to fix
this issue.

Must be backported as far as 2.9.

(cherry picked from commit 19aa320f640f701544c3441787da1577a2479590)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/quic_conn.c