From: Cristian Dumitrescu Date: Mon, 12 Jul 2021 18:18:32 +0000 (+0100) Subject: pipeline: fix selector freeing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=40d42de563e2f0a1fd2062daa05fd3bb0ae3c44a;p=dpdk.git 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 --- 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++) {