mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-17 14:50:59 +01:00
[CLEANUP] config: do not allocate an empty argument for rsp* keywords
This was a harmless copy-paste typo. Empty parameters are strduped and passed to chain_regex(). This was spotted and fixed in 1.4 commit ade5ec430d01b4ba06fd67a63fcee85fea46ba28.
This commit is contained in:
parent
e41914c77e
commit
f33e55af06
@ -3405,7 +3405,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = chain_regex(&curproxy->rsp_exp, preg, ACT_REMOVE, strdup(args[2]));
|
||||
err = chain_regex(&curproxy->rsp_exp, preg, ACT_REMOVE, NULL);
|
||||
if (err) {
|
||||
Alert("parsing [%s:%d] : invalid character or unterminated sequence in replacement string near '%c'.\n",
|
||||
file, linenum, *err);
|
||||
@ -3436,7 +3436,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = chain_regex(&curproxy->rsp_exp, preg, ACT_DENY, strdup(args[2]));
|
||||
err = chain_regex(&curproxy->rsp_exp, preg, ACT_DENY, NULL);
|
||||
if (err) {
|
||||
Alert("parsing [%s:%d] : invalid character or unterminated sequence in replacement string near '%c'.\n",
|
||||
file, linenum, *err);
|
||||
@ -3499,7 +3499,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = chain_regex(&curproxy->rsp_exp, preg, ACT_REMOVE, strdup(args[2]));
|
||||
err = chain_regex(&curproxy->rsp_exp, preg, ACT_REMOVE, NULL);
|
||||
if (err) {
|
||||
Alert("parsing [%s:%d] : invalid character or unterminated sequence in replacement string near '%c'.\n",
|
||||
file, linenum, *err);
|
||||
@ -3530,7 +3530,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = chain_regex(&curproxy->rsp_exp, preg, ACT_DENY, strdup(args[2]));
|
||||
err = chain_regex(&curproxy->rsp_exp, preg, ACT_DENY, NULL);
|
||||
if (err) {
|
||||
Alert("parsing [%s:%d] : invalid character or unterminated sequence in replacement string near '%c'.\n",
|
||||
file, linenum, *err);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user