summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_dplane.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-05-22 01:55:20 +0200
committerDonald Sharp <sharpd@nvidia.com>2023-05-22 16:52:54 +0200
commitd7c9666e060ecbd31f5fa9b384c2a56118bbb279 (patch)
treeaa81215323b7d0dc9cef85417b43bde92810e840 /zebra/zebra_dplane.c
parenttests: Do not Cause test scripts to stop running when config load fails (diff)
downloadfrr-d7c9666e060ecbd31f5fa9b384c2a56118bbb279.tar.xz
frr-d7c9666e060ecbd31f5fa9b384c2a56118bbb279.zip
zebra: Fix paths that have already de-refed ctx
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>
Diffstat (limited to 'zebra/zebra_dplane.c')
-rw-r--r--zebra/zebra_dplane.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 3653f7152..a768c33a3 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -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;
}