From 40d42de563e2f0a1fd2062daa05fd3bb0ae3c44a Mon Sep 17 00:00:00 2001 From: Cristian Dumitrescu Date: Mon, 12 Jul 2021 19:18:32 +0100 Subject: [PATCH] pipeline: fix selector freeing Due to a typo, the selector_free() function incorrectly takes an early return when the selectors array is non-NULL, as opposed to the other way around. Coverity issue: 371912 Fixes: cdaa937d3eaab ("pipeline: support selector table") Signed-off-by: Cristian Dumitrescu --- lib/pipeline/rte_swx_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pipeline/rte_swx_ctl.c b/lib/pipeline/rte_swx_ctl.c index f1480bc27b..dc093860de 100644 --- a/lib/pipeline/rte_swx_ctl.c +++ b/lib/pipeline/rte_swx_ctl.c @@ -815,7 +815,7 @@ selector_free(struct rte_swx_ctl_pipeline *ctl) { uint32_t i; - if (ctl->selectors) + if (!ctl->selectors) return; for (i = 0; i < ctl->info.n_selectors; i++) { -- 2.20.1