net/af_packet: fix memory leak on init failure
authorYunjian Wang <wangyunjian@huawei.com>
Mon, 6 Jul 2020 12:27:51 +0000 (20:27 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jul 2020 16:21:21 +0000 (18:21 +0200)
commit3400148949ea4edecba0256f4ab97e80f1d98474
tree9369876125298939e4f408a4b7b0558b753de4aa
parentc6d1a552a8798df02bf85627c5d47a28ccdc62f8
net/af_packet: fix memory leak on init failure

Add missing code to free memory when the device initialization fails.

Fixes: ccd37d341e8d ("net/af_packet: remove queue number limitation")
Fixes: 5f19dee604ed ("drivers/net: do not use private ethdev data")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/af_packet/rte_eth_af_packet.c