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 /zebra/zebra_mpls.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 'zebra/zebra_mpls.c')
| -rw-r--r-- | zebra/zebra_mpls.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 924a43049b..de7b6a177d 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -188,8 +188,6 @@ static int lsp_install(struct zebra_vrf *zvrf, mpls_label_t label, /* Locate or allocate LSP entry. */ tmp_ile.in_label = label; lsp = hash_get(lsp_table, &tmp_ile, lsp_alloc); - if (!lsp) - return -1; /* For each active nexthop, create NHLFE. Note that we deliberately skip * recursive nexthops right now, because intermediate hops won't @@ -2920,8 +2918,6 @@ int mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf, /* Find or create LSP object */ tmp_ile.in_label = zl->local_label; lsp = hash_get(lsp_table, &tmp_ile, lsp_alloc); - if (!lsp) - return -1; } /* Prep for route/FEC update if requested */ @@ -3199,8 +3195,6 @@ int mpls_lsp_install(struct zebra_vrf *zvrf, enum lsp_types_t type, /* Find or create LSP object */ tmp_ile.in_label = in_label; lsp = hash_get(lsp_table, &tmp_ile, lsp_alloc); - if (!lsp) - return -1; nhlfe = lsp_add_nhlfe(lsp, type, num_out_labels, out_labels, gtype, gate, ifindex, false /*backup*/); @@ -3562,8 +3556,6 @@ int zebra_mpls_static_lsp_add(struct zebra_vrf *zvrf, mpls_label_t in_label, /* Find or create LSP. */ tmp_ile.in_label = in_label; lsp = hash_get(slsp_table, &tmp_ile, lsp_alloc); - if (!lsp) - return -1; nhlfe = nhlfe_find(&lsp->nhlfe_list, ZEBRA_LSP_STATIC, gtype, gate, ifindex); |
