net/hinic: fix hugepage memory leaks
authorGuoyang Zhou <zhouguoyang@huawei.com>
Fri, 20 Nov 2020 09:11:29 +0000 (17:11 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 20 Nov 2020 20:10:05 +0000 (21:10 +0100)
commit511b7371d32b61a6f761f16fefd931241cef60ee
tree398e5252336f41d7f0aa0ce6078141badf0e7284
parent56f0534311d4c61c63e2455169749ae440278122
net/hinic: fix hugepage memory leaks

The 'nic_io' memory is set to NULL before it is freed, this is wrong,
and the freeing of some private port resources should be moved from the
".remove(device)" function to the ".dev_close(port)" function.

Fixes: f30e69b41f94 ("ethdev: add device flag to bypass auto-filled queue xstats")
Cc: stable@dpdk.org
Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
drivers/net/hinic/base/hinic_pmd_nicio.c
drivers/net/hinic/hinic_pmd_ethdev.c