diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-11-25 23:43:18 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-11-25 23:43:18 +0100 |
commit | df9bd12ea22a909c3a3bf8f60699ccfcafb72e77 (patch) | |
tree | 25f3068918fbb794d12bb330be7dccdf893b80a3 | |
parent | bce25ae9f5e33beb499a78a28834edb9734f643b (diff) | |
parent | ab47c2ae466f785212f0519388417ebb31b2cf24 (diff) |
Merge commit 'ab47c2ae' into wireguard-next-tmp7-1
-rw-r--r-- | proto/bgp/config.Y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y index 3c999453..912ff05f 100644 --- a/proto/bgp/config.Y +++ b/proto/bgp/config.Y @@ -371,8 +371,8 @@ custom_attr: ATTRIBUTE BGP NUM type symbol ';' { if($3 > 255 || $3 < 1) cf_error("Invalid attribute number. (Given %i, must be 1-255.)", $3); if($4 != T_BYTESTRING) - cf_error("Attribute type must be bytestring, not %s.", f_type_name($4)); - struct f_dynamic_attr* a = (struct f_dynamic_attr*) malloc(sizeof(struct f_dynamic_attr)); + cf_error("Attribute type must be bytestring, not %s", f_type_name($4)); + struct f_dynamic_attr *a = cfg_alloc(sizeof(struct f_dynamic_attr)); *a = f_new_dynamic_attr(f_type_attr($4), T_BYTESTRING, EA_CODE(PROTOCOL_BGP, $3)); a->flags = BAF_TRANSITIVE | BAF_OPTIONAL; cf_define_symbol(new_config, $5, SYM_ATTRIBUTE, attribute, a); |