BUG/MINOR: http-rules: completely free incorrect TCP rules on error

When a http-request or http-response rule fails to parse, we currently
free only the rule without its contents, which makes ASAN complain.
Now that we have a new function for this, let's completely free the
rule. This relies on this commit:

  MINOR: actions: add new function free_act_rule() to free a single rule

It's probably not needed to backport this since we're on the exit path
anyway.
This commit is contained in:
Willy Tarreau 2022-03-17 20:29:06 +01:00
parent 388c0f2a63
commit dd7e6c6dc7
1 changed files with 3 additions and 3 deletions

View File

@ -163,7 +163,7 @@ struct act_rule *parse_http_req_cond(const char **args, const char *file, int li
return rule; return rule;
out_err: out_err:
free(rule); free_act_rule(rule);
return NULL; return NULL;
} }
@ -241,7 +241,7 @@ struct act_rule *parse_http_res_cond(const char **args, const char *file, int li
return rule; return rule;
out_err: out_err:
free(rule); free_act_rule(rule);
return NULL; return NULL;
} }
@ -310,7 +310,7 @@ struct act_rule *parse_http_after_res_cond(const char **args, const char *file,
return rule; return rule;
out_err: out_err:
free(rule); free_act_rule(rule);
return NULL; return NULL;
} }