From: Wenjun Wu <wenjun1.wu@intel.com>
To: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com,
qi.z.zhang@intel.com
Cc: Wenjun Wu <wenjun1.wu@intel.com>
Subject: [PATCH v1] net/iavf: fix resource leak issue
Date: Tue, 10 May 2022 08:54:25 +0800 [thread overview]
Message-ID: <20220510005425.1648591-1-wenjun1.wu@intel.com> (raw)
This patch fixes resource leak issue reported by coverity.
Coverity issue: 378017
Fixes: b14e8a57b9fe ("net/iavf: support quanta size configuration")
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index d1a2b53675..82672841f4 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2188,7 +2188,8 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
if (ad->devargs.quanta_size < 256 || ad->devargs.quanta_size > 4096 ||
ad->devargs.quanta_size & 0x40) {
PMD_INIT_LOG(ERR, "invalid quanta size\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto bail;
}
bail:
--
2.25.1
next reply other threads:[~2022-05-10 1:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 0:54 Wenjun Wu [this message]
2022-05-11 11:46 ` Zhang, Qi Z
2022-05-11 14:52 ` Thomas Monjalon
2022-05-11 15:31 ` Zhang, Qi Z
2022-05-11 21:17 ` Thomas Monjalon
2022-05-12 0:20 ` Zhang, Qi Z
2022-05-12 7:06 ` Thomas Monjalon
2022-05-12 7:21 ` Zhang, Qi Z
2022-05-17 0:59 ` Zhang, Qi Z
2022-05-17 6:52 ` Thomas Monjalon
2022-05-18 4:55 ` Zhang, Qi Z
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=20220510005425.1648591-1-wenjun1.wu@intel.com \
--to=wenjun1.wu@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
/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).