From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] pipeline: fix incorrect resource free function
Date: Mon, 12 Jul 2021 19:18:32 +0100 [thread overview]
Message-ID: <20210712181833.15293-1-cristian.dumitrescu@intel.com> (raw)
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
next reply other threads:[~2021-07-12 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-12 18:18 Cristian Dumitrescu [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210712181833.15293-1-cristian.dumitrescu@intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).