diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index 7db52b192326..99693a587403 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -5947,8 +5947,7 @@ dplane_srv6_encap_srcaddr_set(const struct in6_addr *addr, ns_id_t ns_id) atomic_fetch_add_explicit(&zdplane_info .dg_srv6_encap_srcaddr_set_errors, 1, memory_order_relaxed); - if (ctx) - dplane_ctx_free(&ctx); + dplane_ctx_free(&ctx); } return result; }