]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: sample: fix memory leak in smp_resolve_args error paths
authorWilly Tarreau <w@1wt.eu>
Sun, 26 Apr 2026 21:55:03 +0000 (23:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 27 Apr 2026 12:44:29 +0000 (14:44 +0200)
commit7465b5ec38bde3c9c7101002881a3d070af0e2bb
treeeb858677e15ad5d195b68cd66c4fdaed8ab8da8d
parenta4f27d96c6be56806aa493f72718aea3c1e28a85
BUG/MINOR: sample: fix memory leak in smp_resolve_args error paths

Several error paths in smp_resolve_args used 'continue' which skipped
LIST_DELETE and free(cur), leaking the arg_list node. Changed all to
'break' to ensure proper cleanup on all error paths. This is harmless
since when such issues are met, the process refuses to start, so no
backport is really needed.
src/sample.c