diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-05-04 21:19:51 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-04 21:19:51 +0300 |
| commit | 50f1f2e724f8614ada1a1a02dd28f1ff3af06e08 (patch) | |
| tree | 8923363c95ef0fb10fd63fd549f580a834b3cca4 /ospfd/ospf_sr.c | |
| parent | d98de984a908579ac1cd0c1a67f32e8381757c55 (diff) | |
| parent | 8e3aae66cec563cee0add26482f279c4aae67cb1 (diff) | |
Merge pull request #11059 from anlancs/fix/bgpd-evnp-wrong-check-hashget
bgpd: fix memory leak for evpn
Diffstat (limited to 'ospfd/ospf_sr.c')
| -rw-r--r-- | ospfd/ospf_sr.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c index c861685f4e..090a655cee 100644 --- a/ospfd/ospf_sr.c +++ b/ospfd/ospf_sr.c @@ -1463,14 +1463,6 @@ void ospf_sr_ri_lsa_update(struct ospf_lsa *lsa) srn = (struct sr_node *)hash_get(OspfSR.neighbors, &lsah->adv_router, (void *)sr_node_new); - /* Sanity check */ - if (srn == NULL) { - flog_err( - EC_OSPF_SR_NODE_CREATE, - "SR (%s): Abort! can't create SR node in hash table", - __func__); - return; - } /* update LSA ID */ srn->instance = ntohl(lsah->id.s_addr); /* Copy SRGB */ @@ -1582,14 +1574,6 @@ void ospf_sr_ext_link_lsa_update(struct ospf_lsa *lsa) (void *)&(lsah->adv_router), (void *)sr_node_new); - /* Sanity check */ - if (srn == NULL) { - flog_err(EC_OSPF_SR_NODE_CREATE, - "SR (%s): Abort! can't create SR node in hash table", - __func__); - return; - } - /* Initialize TLV browsing */ length = lsa->size - OSPF_LSA_HEADER_SIZE; for (tlvh = TLV_HDR_TOP(lsah); length > 0 && tlvh; @@ -1814,15 +1798,6 @@ void ospf_sr_ext_prefix_lsa_update(struct ospf_lsa *lsa) srn = (struct sr_node *)hash_get(OspfSR.neighbors, (void *)&(lsah->adv_router), (void *)sr_node_new); - - /* Sanity check */ - if (srn == NULL) { - flog_err(EC_OSPF_SR_NODE_CREATE, - "SR (%s): Abort! can't create SR node in hash table", - __func__); - return; - } - /* Initialize TLV browsing */ length = lsa->size - OSPF_LSA_HEADER_SIZE; for (tlvh = TLV_HDR_TOP(lsah); length > 0 && tlvh; |
