From d8e479a355b728645fafbd70836eb5f33746b694 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 11 May 2019 08:39:54 -0400 Subject: [PATCH] zebra: ctx is dereferenced in every path No need to check for non-null ctx at this point in the function as that it has already been derefed. Signed-off-by: donald Sharp ,sahrpd@cumulusnetworks.com> --- zebra/zebra_dplane.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index ae52762c5a..6fc62147c8 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -1574,8 +1574,7 @@ done: else { atomic_fetch_add_explicit(&zdplane_info.dg_lsp_errors, 1, memory_order_relaxed); - if (ctx) - dplane_ctx_free(&ctx); + dplane_ctx_free(&ctx); } return result; @@ -1609,8 +1608,7 @@ done: else { atomic_fetch_add_explicit(&zdplane_info.dg_pw_errors, 1, memory_order_relaxed); - if (ctx) - dplane_ctx_free(&ctx); + dplane_ctx_free(&ctx); } return result; @@ -1737,8 +1735,7 @@ static enum zebra_dplane_result intf_addr_update_internal( /* Error counter */ atomic_fetch_add_explicit(&zdplane_info.dg_intf_addr_errors, 1, memory_order_relaxed); - if (ctx) - dplane_ctx_free(&ctx); + dplane_ctx_free(&ctx); } return result; -- 2.39.5