summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-06-29 15:24:20 -0400
committerDonald Sharp <sharpd@nvidia.com>2022-06-29 15:24:20 -0400
commitf00b37e710e5dd402a514af8817e2cca7d1710ce (patch)
tree94e8469e1a35c6d4f932c74fccae18dc23165591 /zebra/zebra_mpls.c
parent03c95c540f1884dcaf74a81bc309fc51547054dd (diff)
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 <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c9
1 files changed, 2 insertions, 7 deletions
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);
}
/*