]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Fix paths that have already de-refed ctx
authorDonald Sharp <sharpd@nvidia.com>
Sun, 21 May 2023 23:55:20 +0000 (19:55 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 22 May 2023 14:52:54 +0000 (10:52 -0400)
There is no path in some functions where the ctx
has not already been de-refed.  As such no need
to test for it's existence.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/zebra_dplane.c

index 3653f715276b3ae40d81cdcec3a2da10f3a3fb09..a768c33a30eba3fd43c920ccb4b66c59a60c5274 100644 (file)
@@ -3799,8 +3799,7 @@ tc_qdisc_update_internal(enum dplane_op_e op,
        } else {
                atomic_fetch_add_explicit(&zdplane_info.dg_tcs_errors, 1,
                                          memory_order_relaxed);
-               if (ctx)
-                       dplane_ctx_free(&ctx);
+               dplane_ctx_free(&ctx);
        }
 
        return result;
@@ -3830,8 +3829,7 @@ tc_class_update_internal(enum dplane_op_e op, struct zebra_tc_class *class)
        } else {
                atomic_fetch_add_explicit(&zdplane_info.dg_tcs_errors, 1,
                                          memory_order_relaxed);
-               if (ctx)
-                       dplane_ctx_free(&ctx);
+               dplane_ctx_free(&ctx);
        }
 
        return result;
@@ -3861,8 +3859,7 @@ tc_filter_update_internal(enum dplane_op_e op, struct zebra_tc_filter *filter)
        } else {
                atomic_fetch_add_explicit(&zdplane_info.dg_tcs_errors, 1,
                                          memory_order_relaxed);
-               if (ctx)
-                       dplane_ctx_free(&ctx);
+               dplane_ctx_free(&ctx);
        }
 
        return result;
@@ -4230,8 +4227,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;
 }