summaryrefslogtreecommitdiff
path: root/zebra/zebra_dplane.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-04-21 08:54:51 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-04-21 08:54:51 -0400
commit6f99cfcd897fa63f24a9e9fcf9999aaf7ad76e69 (patch)
tree66194f88e6f3221d822bfbb06c353eb7cae438eb /zebra/zebra_dplane.c
parent4dbef8567bda06418e8d1aeb566aab4d2593a65e (diff)
zebra: ctx has to be non NULL at this point
Remove the pointer check for ctx. At this point in the function it has to be non null since we deref'ed it. Additionally the alloc function that creates it cannot fail. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_dplane.c')
-rw-r--r--zebra/zebra_dplane.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index e821572c5d..f6c1fdd78e 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -5380,8 +5380,7 @@ dplane_gre_set(struct interface *ifp, struct interface *ifp_link,
atomic_fetch_add_explicit(
&zdplane_info.dg_gre_set_errors, 1,
memory_order_relaxed);
- if (ctx)
- dplane_ctx_free(&ctx);
+ dplane_ctx_free(&ctx);
result = ZEBRA_DPLANE_REQUEST_FAILURE;
}
return result;