]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: uri-auth: avoid leaks on initialization error
authorWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 13:23:18 +0000 (15:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 14:04:19 +0000 (16:04 +0200)
commit2dfbc311a8bc46e5b5ef8d31069d9cba75a08d3d
tree3b642805de4e976dc91d6185814f12dc8d6607ab
parentfdfecc55899e801558c9cad00761608a03497278
BUG/MINOR: uri-auth: avoid leaks on initialization error

When stats_add_scope() and stats_add_auth() fail to initialize a field,
they just leave a partially allocated and initialized structure behind
them that is leaked. The whole architecture doesn't provide clean
unrolling abilities since everything is shared and assigned unconditionally,
but let's at least release what was just allocated. The whole approach would
probably deserve being revisited if one day this becomes more dynamic.

No backport needed.
src/uri_auth.c