summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_evpn_vty.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index c0ad72dc33..7dbfdc60d4 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -6639,9 +6639,10 @@ void bgp_config_write_evpn_info(struct vty *vty, struct bgp *bgp, afi_t afi,
char *vni_str = NULL;
vni_str = strchr(ecom_str, ':');
-
- if (!vni_str)
- continue; /* This should never happen */
+ if (!vni_str) {
+ XFREE(MTYPE_ECOMMUNITY_STR, ecom_str);
+ continue;
+ }
/* Move pointer to vni */
vni_str += 1;