git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa022e6
)
net/thunderx: fix memory leak on rbdr desc ring failure
author
Yunjian Wang
<wangyunjian@huawei.com>
Tue, 20 Oct 2020 15:02:37 +0000
(23:02 +0800)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:06 +0000
(23:35 +0100)
In nicvf_qset_rbdr_alloc(), we allocate memory for the 'rbdr'
structure but not released when allocate 'rbdr desc ring' fails.
Fixes:
7413feee662d
("net/thunderx: add device start/stop and close")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/net/thunderx/nicvf_ethdev.c
patch
|
blob
|
history
diff --git
a/drivers/net/thunderx/nicvf_ethdev.c
b/drivers/net/thunderx/nicvf_ethdev.c
index
f0bd20a
..
b6bb05e
100644
(file)
--- a/
drivers/net/thunderx/nicvf_ethdev.c
+++ b/
drivers/net/thunderx/nicvf_ethdev.c
@@
-638,6
+638,7
@@
nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic,
NICVF_RBDR_BASE_ALIGN_BYTES, nic->node);
if (rz == NULL) {
PMD_INIT_LOG(ERR, "Failed to allocate mem for rbdr desc ring");
+ rte_free(rbdr);
return -ENOMEM;
}