]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: http: Memory leak of http redirect rules' format string
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Fri, 6 Jan 2023 15:31:06 +0000 (16:31 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Jan 2023 15:42:24 +0000 (16:42 +0100)
commit3120284c29f8f4c25458c432c544786657e5db26
treef60a825a5e871bd6270c1a1bf92931c2c2e19b35
parent80ff10c81d7e4e752f59764bfda206f5043dd764
BUG/MINOR: http: Memory leak of http redirect rules' format string

When the configuration contains such a line:
    http-request redirect location /
a "struct logformat_node" object is created and it contains an "arg"
member which gets alloc'ed as well in which we copy the new location
(see add_to_logformat_list). This internal arg pointer was not freed in
the dedicated release_http_redir release function.
Likewise, the expression pointer was not released as well.

This patch can be backported to all stable branches. It should apply
as-is all the way to 2.2 but it won't on 2.0 because release_http_redir
did not exist yet.
src/http_act.c
src/proxy.c