diff mbox

[dpdk-dev] net/i40e: fix memory leak if VF init fails

Message ID 1505244002-51248-1-git-send-email-jingjing.wu@intel.com (mailing list archive)
State Superseded, archived
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Wu, Jingjing Sept. 12, 2017, 7:20 p.m. UTC
Cc: stable@dpdk.org
Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f6d8293..9eca9ed 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1317,6 +1317,8 @@  i40evf_init_vf(struct rte_eth_dev *dev)
 
 err_alloc:
 	rte_free(vf->vf_res);
+	rte_free(vf->aq_resp);
+	vf->vsi_res = NULL;
 err_aq:
 	i40e_shutdown_adminq(hw); /* ignore error */
 err: