]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: vars: Delay variable content freeing in var_set function
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Thu, 16 Dec 2021 16:14:36 +0000 (17:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 16 Dec 2021 16:31:31 +0000 (17:31 +0100)
commit25fccd52ac6efb6788bad1769947ee6825713c86
tree315e0b9f89b473fbd68c331f954dc4060aa63d61
parent1bd98050853357bd8b2b482772fab3ba14148404
MINOR: vars: Delay variable content freeing in var_set function

When calling var_set on a variable of type string (SMP_T_STR, SMP_T_BIN
or SMP_T_METH), the contents of the variable were freed directly. When
adding conditions to set-var calls we might have cases in which the
contents of an existing variable should be kept unchanged so the freeing
of the internal buffers is delayed in the var_set function (so that we
can bypass it later).
src/vars.c