mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02: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 = (struct redirect_rule *)calloc(1, sizeof(*rule));
|
||||||
rule->cond = cond;
|
rule->cond = cond;
|
||||||
|
LIST_INIT(&rule->rdr_fmt);
|
||||||
|
|
||||||
if (!use_fmt) {
|
if (!use_fmt) {
|
||||||
/* old-style static redirect rule */
|
/* old-style static redirect rule */
|
||||||
@ -8812,7 +8813,6 @@ struct redirect_rule *http_parse_redirect_rule(const char *file, int linenum, st
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* log-format based redirect rule */
|
/* log-format based redirect rule */
|
||||||
LIST_INIT(&rule->rdr_fmt);
|
|
||||||
|
|
||||||
/* Parse destination. Note that in the REDIRECT_TYPE_PREFIX case,
|
/* Parse destination. Note that in the REDIRECT_TYPE_PREFIX case,
|
||||||
* if prefix == "/", we don't want to add anything, otherwise it
|
* if prefix == "/", we don't want to add anything, otherwise it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user