]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: memprof: avoid a small memory leak in "show profiling"
authorWilly Tarreau <w@1wt.eu>
Wed, 11 Mar 2026 14:14:43 +0000 (15:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Mar 2026 17:06:37 +0000 (18:06 +0100)
commited44adc3ca3ca24aebe213d2d4aba22205e5ecea
tree755613552b8f6eac2355d31c4e9ff1b51a4a59c7
parent4d5a91b8af06604f97cae22a7db381d4deb4b1ec
BUG/MINOR: memprof: avoid a small memory leak in "show profiling"

In 3.1, per-DSO statistics were added to the memprofile output by
commit 401fb0e87a ("MINOR: activity/memprofile: show per-DSO stats").
However an strdup() is performed there on the .info field, that is
never freed when leaving the function. Let's do it each time we leave
it. Ironically, this was found thanks to "show profiling" showing
itself as an unbalanced caller of strdup().

This needs to be backported to 3.0 since that commit was backported
there.
src/activity.c