mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-05 04:56:10 +02:00
BUG/MINOR: resolvers: Free opts on parse error in resolv_parse_do_resolve()
The error handler at do_resolve_parse_error freed varname and resolvers_id but missed freeing rule->arg.resolv.opts (allocated via calloc). Added ha_free(&rule->arg.resolv.opts) to the cleanup path. This patch could be backported to all stable branches.
This commit is contained in:
parent
3b1db89283
commit
1d54b9f70e
@ -3403,6 +3403,7 @@ enum act_parse_ret resolv_parse_do_resolve(const char **args, int *orig_arg, str
|
||||
do_resolve_parse_error:
|
||||
ha_free(&rule->arg.resolv.varname);
|
||||
ha_free(&rule->arg.resolv.resolvers_id);
|
||||
ha_free(&rule->arg.resolv.opts);
|
||||
memprintf(err, "Can't parse '%s'. Expects 'do-resolve(<varname>,<resolvers>[,<options>]) <expr>'. Available options are 'ipv4' and 'ipv6'",
|
||||
args[cur_arg]);
|
||||
return ACT_RET_PRS_ERR;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user