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:
parent
388c0f2a63
commit
dd7e6c6dc7
|
@ -163,7 +163,7 @@ struct act_rule *parse_http_req_cond(const char **args, const char *file, int li
|
|||
|
||||
return rule;
|
||||
out_err:
|
||||
free(rule);
|
||||
free_act_rule(rule);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -241,7 +241,7 @@ struct act_rule *parse_http_res_cond(const char **args, const char *file, int li
|
|||
|
||||
return rule;
|
||||
out_err:
|
||||
free(rule);
|
||||
free_act_rule(rule);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ struct act_rule *parse_http_after_res_cond(const char **args, const char *file,
|
|||
|
||||
return rule;
|
||||
out_err:
|
||||
free(rule);
|
||||
free_act_rule(rule);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue