]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: h3: fix memleak on HEADERS parsing failure
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 15 Dec 2022 09:53:55 +0000 (10:53 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 15 Dec 2022 10:48:30 +0000 (11:48 +0100)
commit788fc054016761d835cff5e560f9f250c4c739d6
treee8d90b6dd496a44eaa1c3c876311fec0fb5f5abe
parent19942e3859cb5b81fb99448a648f213806fb0bee
BUG/MINOR: h3: fix memleak on HEADERS parsing failure

If an error is triggered on H3 HEADERS parsing, the allocated buffer for
HTX data is not freed.

To prevent this memleak, all return path have been centralized using
goto statements.

Also, as a small bonus, offer_buffers() is not called anymore if buffer
is not freed because sedesc has taken it. However this change has
probably no noticeable effect as dynamic buffers management is not
functional currently.

This should be backported up to 2.6.
src/h3.c