DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] pipeline: fix incorrect resource free function
@ 2021-07-12 18:18 Cristian Dumitrescu
  2021-07-12 18:18 ` [dpdk-dev] [PATCH 2/2] examples/pipeline: fix incorrect array out of bounds check Cristian Dumitrescu
  0 siblings, 1 reply; 3+ messages in thread
From: Cristian Dumitrescu @ 2021-07-12 18:18 UTC (permalink / raw)
  To: dev

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@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-21 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 18:18 [dpdk-dev] [PATCH 1/2] pipeline: fix incorrect resource free function Cristian Dumitrescu
2021-07-12 18:18 ` [dpdk-dev] [PATCH 2/2] examples/pipeline: fix incorrect array out of bounds check Cristian Dumitrescu
2021-07-21 11:46   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).