net/ice: fix memory leak on dev closed
authorHaiyue Wang <haiyue.wang@intel.com>
Mon, 14 Oct 2019 14:50:04 +0000 (22:50 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:09 +0000 (16:43 +0200)
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>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/ice_ethdev.c

index d848440..e608a72 100644 (file)
@@ -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;