summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Ruddy <pat@voltanet.io>2020-11-25 10:18:45 +0000
committerPat Ruddy <pat@voltanet.io>2020-11-25 18:23:13 +0000
commitf61fbf216b9e74fce660424d52270e5502bc3a1b (patch)
tree5a28b3f204b7db03e445db9af334518efa1e7e3e
parentad88608a369f5f9e23d5ddfdadfa33f6c0e5a2d0 (diff)
bgpd: correctly store allocated ES struct
in the rare situation where we allocate the ES during the path link we fail to check/store the allocated ES pointer thus leading to a NULL dereference later in the function. Signed-off-by: Pat Ruddy <pat@voltanet.io>
-rw-r--r--bgpd/bgp_evpn_mh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_evpn_mh.c b/bgpd/bgp_evpn_mh.c
index 0494200e34..4bc53b10e8 100644
--- a/bgpd/bgp_evpn_mh.c
+++ b/bgpd/bgp_evpn_mh.c
@@ -1422,7 +1422,7 @@ void bgp_evpn_path_es_link(struct bgp_path_info *pi, vni_t vni, esi_t *esi)
/* find-create ES */
es = bgp_evpn_es_find(esi);
if (!es)
- bgp_evpn_es_new(bgp_evpn, esi);
+ es = bgp_evpn_es_new(bgp_evpn, esi);
/* dup check */
if (es_info->es == es)