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/interface.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'zebra/interface.c') diff --git a/zebra/interface.c b/zebra/interface.c index 9800e64503..de7db2d48f 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1504,7 +1504,7 @@ void zebra_if_dplane_result(struct zebra_dplane_ctx *ctx) if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug("%s: can't find zns id %u", __func__, ns_id); - goto done; + return; } ifp = if_lookup_by_index_per_ns(zns, ifindex); @@ -1516,7 +1516,7 @@ void zebra_if_dplane_result(struct zebra_dplane_ctx *ctx) "%s: can't find ifp at nsid %u index %d", __func__, ns_id, ifindex); - goto done; + return; } } @@ -1578,8 +1578,6 @@ void zebra_if_dplane_result(struct zebra_dplane_ctx *ctx) case DPLANE_OP_GRE_SET: break; /* should never hit here */ } -done: - dplane_ctx_fini(&ctx); } /* Dump if address information to vty. */ -- cgit v1.2.3