mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-13 10:50:16 -04: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 ade5ec430d.
This commit is contained in:
parent
e41914c77e
commit
f33e55af06
1 changed files with 4 additions and 4 deletions
|
|
@ -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…
Reference in a new issue