]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: log: deinitialization of the log buffer in one function
authorMiroslav Zagorac <mzagorac@haproxy.com>
Tue, 30 Jan 2024 02:14:09 +0000 (03:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 30 Jan 2024 07:27:26 +0000 (08:27 +0100)
commit24a5e42db60a00e616e6a73041b7a562588b3d19
tree25764a6a7c76b49eb83827e4e706b97b345e248c
parenta13989f109033e7139c58fdc78c35ef02576d788
CLEANUP: log: deinitialization of the log buffer in one function

In several places in the source, there was the same block of code that was
used to deinitialize the log buffer.  There were even two functions that
did this, but they were called only from the code that is in the same
source file (free_tcpcheck_fmt() in src/tcpcheck.c and free_logformat_list()
in src/proxy.c - they were both static functions).

The function free_logformat_list() was moved from the file src/proxy.c to
src/log.c, and a check of the list before freeing the memory was added to
that function.
include/haproxy/log.h
src/fcgi-app.c
src/http_act.c
src/http_htx.c
src/http_rules.c
src/log.c
src/proxy.c
src/tcpcheck.c
src/vars.c