net/octeontx: fix dangling pointer on init failure
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 7 Apr 2020 11:35:43 +0000 (19:35 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 5 May 2020 13:54:26 +0000 (15:54 +0200)
commit5ed5df8073c80d1af9ec8c89a8b2a5299463058d
treee0904cebe29f86831406b73151c537d66eb62006
parentf97b56f9f12eef610f4274bd5fb1c68b604bbb3b
net/octeontx: fix dangling pointer on init failure

When octeontx_create() is cleaning up, it does not correctly set
the mac_addrs variable to NULL, which will lead to a double free.

Fixes: 9e399b88ce2f ("net/octeontx: fix memory leak of MAC address table")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
drivers/net/octeontx/octeontx_ethdev.c