From f00b37e710e5dd402a514af8817e2cca7d1710ce Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 29 Jun 2022 15:24:20 -0400 Subject: zebra: make rib_process_dplane_results own ctx freeing The rib_process_dplane_results function was having each sub function handler process the results and then free the ctx. Lot's of functionality that needs to remember to free the context. Let's just free it in the main loop. Signed-off-by: Donald Sharp --- zebra/zebra_mpls.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'zebra/zebra_mpls.c') diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 8237bebf3b..772e30833c 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -1855,8 +1855,6 @@ void zebra_mpls_lsp_dplane_result(struct zebra_dplane_ctx *ctx) break; } /* Switch */ - - dplane_ctx_fini(&ctx); } /* @@ -2064,7 +2062,7 @@ void zebra_mpls_process_dplane_notify(struct zebra_dplane_ctx *ctx) /* Look for zebra LSP object */ zvrf = vrf_info_lookup(VRF_DEFAULT); if (zvrf == NULL) - goto done; + return; lsp_table = zvrf->lsp_table; @@ -2074,7 +2072,7 @@ void zebra_mpls_process_dplane_notify(struct zebra_dplane_ctx *ctx) if (is_debug) zlog_debug("dplane LSP notif: in-label %u not found", dplane_ctx_get_in_label(ctx)); - goto done; + return; } /* @@ -2147,9 +2145,6 @@ void zebra_mpls_process_dplane_notify(struct zebra_dplane_ctx *ctx) UNSET_FLAG(lsp->flags, LSP_FLAG_INSTALLED); clear_nhlfe_installed(lsp); } - -done: - dplane_ctx_fini(&ctx); } /* -- cgit v1.2.3