]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: log: fix memory leak on logsrv parse error
authorWilly Tarreau <w@1wt.eu>
Tue, 27 Oct 2020 08:51:37 +0000 (09:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 27 Oct 2020 08:55:00 +0000 (09:55 +0100)
commitae32ac74dbc2cb93a07d7d29b4c20a075bc7741a
tree750b1ce2f9ce4e3d24b4467bf08a3897b43db2fc
parenta73a222a9863e5f6763786845c1ff9e7e1038c3c
BUG/MINOR: log: fix memory leak on logsrv parse error

In case of parsing error on logsrv, we can leave parse_logsrv() without
releasing logsrv->ring_name or smp_rgs. Let's free them on the error path.
This should fix issue #926 detected by Coverity.

The impact is only a tiny leak just before reporting a fatal error, so it
will essentially annoy valgrind.

This can be backported to 2.0 (just drop the ring part).
src/log.c