mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-15 07:54:33 +00:00
BUG/MINOR: http: usual deinit stuff in last commit
We need to initialize the rdr_fmt list inconditionally. Using only a redirect rule without an http-redirect may cause a crash during deinit because of the list iterating from null.
This commit is contained in:
parent
d18cd0f110
commit
60e0838f60
@ -8804,6 +8804,7 @@ struct redirect_rule *http_parse_redirect_rule(const char *file, int linenum, st
|
||||
|
||||
rule = (struct redirect_rule *)calloc(1, sizeof(*rule));
|
||||
rule->cond = cond;
|
||||
LIST_INIT(&rule->rdr_fmt);
|
||||
|
||||
if (!use_fmt) {
|
||||
/* old-style static redirect rule */
|
||||
@ -8812,7 +8813,6 @@ struct redirect_rule *http_parse_redirect_rule(const char *file, int linenum, st
|
||||
}
|
||||
else {
|
||||
/* log-format based redirect rule */
|
||||
LIST_INIT(&rule->rdr_fmt);
|
||||
|
||||
/* Parse destination. Note that in the REDIRECT_TYPE_PREFIX case,
|
||||
* if prefix == "/", we don't want to add anything, otherwise it
|
||||
|
Loading…
Reference in New Issue
Block a user