[v2,1/2] net/ice: fix the missed memory free when dev is closed

Message ID 20191014145005.94650-2-haiyue.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series net/ice: protocol extraction related issues |

Checks

Context Check Description
ci/iol-compilation success Compile Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Wang, Haiyue Oct. 14, 2019, 2:50 p.m. UTC
  The original protocol extraction memory free is removed by introducing
new design for releasing port upon close.

Fixes: bd513ece3c40 ("net/ice: release port upon close")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 022b58c01..880d2679b 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2126,6 +2126,8 @@  ice_dev_close(struct rte_eth_dev *dev)
 	rte_free(hw->port_info);
 	hw->port_info = NULL;
 	ice_shutdown_all_ctrlq(hw);
+	rte_free(pf->proto_xtr);
+	pf->proto_xtr = NULL;
 
 	dev->dev_ops = NULL;
 	dev->rx_pkt_burst = NULL;