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.
(cherry picked from commit 3120284c29f8f4c25458c432c544786657e5db26)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit fe5f84ae3eddbfbb34b1fd9b08b50c6246358279)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 23db8c664b5d5575248f9795360cfc623c472486)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f4a3d5c6ff89f9c368558caf1aa7ed0fe374a464)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
2 files changed