]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: config: Make use_backend and use-server post-parsing less obscur
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 7 May 2020 13:59:33 +0000 (15:59 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 7 May 2020 13:59:35 +0000 (15:59 +0200)
commitf82ea4ae4ca4a6fca70a6e874643db887a39f037
tree54001457377b2dd06493cebf682f908904f9d10c
parentad9f9ed3f48c296a3f0fbe961ab142161c79c461
BUG/MINOR: config: Make use_backend and use-server post-parsing less obscur

During use_backend and use-server post-parsing, if the log-format string used to
specify the backend or the server is just a single string, the log-format string
(a list, internally) is replaced by the string itself. Because the field is an
union, the list is not emptied according to the rules of art. The element, when
released, is not removed from the list. There is no bug, but it is clearly not
obvious and error prone.

This patch should fix #544. The fix for the use_backend post-parsing may be
backported to all stable releases. use-server is static in 2.1 and prior.
src/cfgparse.c