BUG/MINOR: auth: Fix a leak on error path when parsing user's groups
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Feb 2025 15:52:17 +0000 (16:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Feb 2025 10:43:06 +0000 (11:43 +0100)
commit8074bb26d1bbcb225100329ada2498112222e512
treeea637721d5cb2ca074f0776e0fd3ae47eeeda3f8
parent4c9c15e3fcf489b5fb609c6f0f1c9e06047c7cef
BUG/MINOR: auth: Fix a leak on error path when parsing user's groups

In a userlist section, when a user is parsed, if a specified group is not
found, an error is reported. In this case we must take care to release the
alredy built groups list.

It was reported by Coverity in #2841: CID 1587770.

This patch could be backported to all stable versions.

(cherry picked from commit a7f513af9187444680e3e054e0a13f818aed3307)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/auth.c