mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-02 10:12:03 +00:00
haproxy public development tree
9fa0df55cd
Instead of simply calling free() in expr->smp->arg_p in certain cases properly free the sample using release_sample_expr(). Given the following example configuration: frontend foo bind *:8080 mode http http-request set-var(txn.foo) str(bar) acl is_match str(foo),strcmp(txn.hash) -m bool Running a configuration check within valgrind reports: ==31371== 160 (48 direct, 112 indirect) bytes in 1 blocks are definitely lost in loss record 35 of 45 ==31371== at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==31371== by 0x4C3832: sample_parse_expr (sample.c:876) ==31371== by 0x56B3E0: parse_acl_expr (acl.c:319) ==31371== by 0x56BA4F: parse_acl (acl.c:697) ==31371== by 0x48D225: cfg_parse_listen (cfgparse-listen.c:816) ==31371== by 0x4797C3: readcfgfile (cfgparse.c:2167) ==31371== by 0x5293ED: init (haproxy.c:2021) ==31371== by 0x41F382: main (haproxy.c:3126) After this patch this leak is reduced. It will be fully removed in a follow up patch: ==32503== 32 bytes in 1 blocks are definitely lost in loss record 20 of 43 ==32503== at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==32503== by 0x4C39B5: sample_parse_expr (sample.c:982) ==32503== by 0x56B410: parse_acl_expr (acl.c:319) ==32503== by 0x56BA7F: parse_acl (acl.c:697) ==32503== by 0x48D225: cfg_parse_listen (cfgparse-listen.c:816) ==32503== by 0x4797C3: readcfgfile (cfgparse.c:2167) ==32503== by 0x52943D: init (haproxy.c:2021) ==32503== by 0x41F382: main (haproxy.c:3133) This is a fairly minor leak that can only be observed if ACLs need to be freed, which is not something that should occur during normal processing and most likely only during shut down. Thus no backport should be needed. |
||
---|---|---|
.github | ||
contrib | ||
doc | ||
examples | ||
include | ||
reg-tests | ||
scripts | ||
src | ||
tests | ||
.cirrus.yml | ||
.gitignore | ||
.travis.yml | ||
BRANCHES | ||
CHANGELOG | ||
CONTRIBUTING | ||
INSTALL | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
README | ||
ROADMAP | ||
SUBVERS | ||
VERDATE | ||
VERSION |
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)