BUG/MINOR: proxy: missing free in free_proxy for redirect rules

cookie_str from struct redirect, which may be allocated through
http_parse_redirect_rule() function is not properly freed on proxy
cleanup within free_proxy().

This could be backported to all stable versions.

[for 2.2, free_proxy() did not exist so the fix needs to be performed
directly in deinit() function from haproxy.c]
This commit is contained in:
Aurelien DARRAGON 2023-05-11 12:36:32 +02:00 committed by Christopher Faulet
parent 7542fb43d6
commit 8dfc2491d2
1 changed files with 1 additions and 0 deletions

View File

@ -243,6 +243,7 @@ void free_proxy(struct proxy *p)
free(rdr->cond);
}
free(rdr->rdr_str);
free(rdr->cookie_str);
list_for_each_entry_safe(lf, lfb, &rdr->rdr_fmt, list) {
LIST_DELETE(&lf->list);
release_sample_expr(lf->expr);