[PATCH v1] net/iavf: fix resource leak issue
Wenjun Wu
wenjun1.wu at intel.com
Tue May 10 02:54:25 CEST 2022
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 at 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
More information about the dev
mailing list