[dpdk-dev] [PATCH 1/2] pipeline: fix incorrect resource free function
Cristian Dumitrescu
cristian.dumitrescu at intel.com
Mon Jul 12 20:18:32 CEST 2021
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 <cristian.dumitrescu at intel.com>
---
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.17.1
More information about the dev
mailing list