mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-12 10:06:58 +02:00
BUG/MINOR: tcp-rules: completely free incorrect TCP rules on error
When a tcp-request or tcp-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. Reg-tests are now completely OK with ASAN. 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
6a783e499c
commit
388c0f2a63
@ -1192,7 +1192,7 @@ static int tcp_parse_tcp_rep(char **args, int section_type, struct proxy *curpx,
|
|||||||
|
|
||||||
return warn;
|
return warn;
|
||||||
error:
|
error:
|
||||||
free(rule);
|
free_act_rule(rule);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1406,7 +1406,7 @@ static int tcp_parse_tcp_req(char **args, int section_type, struct proxy *curpx,
|
|||||||
|
|
||||||
return warn;
|
return warn;
|
||||||
error:
|
error:
|
||||||
free(rule);
|
free_act_rule(rule);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user