BUG/MINOR: ssl/ckch: always free() the previous entry during parsing
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 9 May 2025 17:01:28 +0000 (19:01 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 May 2025 16:11:38 +0000 (18:11 +0200)
commit503ddb0c04cf79510d2a6921a26a30ef714e6634
tree5a0ba1acaa1e5f6376d4309c6ebe2f32c52170fb
parent522a40a26783675d1a77864cf100e3d6e0149392
BUG/MINOR: ssl/ckch: always free() the previous entry during parsing

The ckch_conf_parse() function is the generic function which parses
crt-store keywords from the crt-store section, and also from a crt-list.

When having multiple time the same keyword, a leak of the previous value
happens. This patch ensure that the previous value is always freed
before overwriting it.

This patch should be backported as far as 3.0.

(cherry picked from commit 311e0aa5c712f38700b7b185c0d5f1aa33c48613)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit adebe6246558ece09c82fbbf3e549cf5e4cdd2ec)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/ssl_ckch.c