diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-09-12 05:05:42 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-09-16 13:11:21 +0300 |
| commit | df6a97a6433aa583bbb573ad7deb54498a8b8681 (patch) | |
| tree | a160c850dcc09e58fbd7d3ac95e531acc1c6d550 /bgpd/bgp_evpn_vty.c | |
| parent | a05ae6c440131e7ef6db23e9738101495335175b (diff) | |
bgpd: Free ecommunity before returning on warning/error
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_evpn_vty.c')
| -rw-r--r-- | bgpd/bgp_evpn_vty.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index f6b87dccdb..c16ac5636b 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -6031,6 +6031,7 @@ DEFUN(no_bgp_evpn_ead_es_rt, no_bgp_evpn_ead_es_rt_cmd, if (!bgp_evpn_rt_matches_existing(bgp_mh_info->ead_es_export_rtl, ecomdel)) { + ecommunity_free(&ecomdel); vty_out(vty, "%% RT specified does not match EAD-ES RT configuration\n"); return CMD_WARNING; @@ -6165,6 +6166,7 @@ DEFUN (no_bgp_evpn_vni_rt, if (rt_type == RT_TYPE_IMPORT) { if (!bgp_evpn_rt_matches_existing(vpn->import_rtl, ecomdel)) { + ecommunity_free(&ecomdel); vty_out(vty, "%% RT specified does not match configuration for this VNI\n"); return CMD_WARNING; @@ -6172,6 +6174,7 @@ DEFUN (no_bgp_evpn_vni_rt, evpn_unconfigure_import_rt(bgp, vpn, ecomdel); } else if (rt_type == RT_TYPE_EXPORT) { if (!bgp_evpn_rt_matches_existing(vpn->export_rtl, ecomdel)) { + ecommunity_free(&ecomdel); vty_out(vty, "%% RT specified does not match configuration for this VNI\n"); return CMD_WARNING; @@ -6191,6 +6194,7 @@ DEFUN (no_bgp_evpn_vni_rt, } if (!found_ecomdel) { + ecommunity_free(&ecomdel); vty_out(vty, "%% RT specified does not match configuration for this VNI\n"); return CMD_WARNING; |
