]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cfgparse-tcp: leak when re-declaring interface from bind line
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 1 Jun 2023 07:57:15 +0000 (09:57 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 6 Jun 2023 13:15:17 +0000 (15:15 +0200)
commitc49224a29df65d81399058d2bb6cd36056915239
treee5f4b688972b42362b688511b726d1be8ea15290
parent1bdd490f9f05a41faeabb64533e404c749a78372
BUG/MINOR: cfgparse-tcp: leak when re-declaring interface from bind line

When interface keyword is used multiple times within the same bind line,
the previous value isn't checked and is rewritten as-is, resulting in a
small memory leak.

Ensuring the interface name is first freed before assigning it to a new
value.

This may be backported to every stable versions.

[Note for 2.2, the fix must be performed in bind_parse_interface() from
proto_tcp.c, directly within the listener's loop, also ha_free() was
not available so free() must be used instead]
src/cfgparse-tcp.c