From f93949c3afc39b0f610e0661f7baa21060ada13a Mon Sep 17 00:00:00 2001 From: Haiyue Wang Date: Mon, 14 Oct 2019 22:50:04 +0800 Subject: [PATCH] net/ice: fix memory leak on dev closed 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 Reviewed-by: Xiaolong Ye --- drivers/net/ice/ice_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index d848440a12..e608a72e20 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2128,6 +2128,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; -- 2.20.1