net/iavf: fix resource leak on probing failure
authorQiming Chen <chenqiming_huawei@163.com>
Fri, 10 Sep 2021 07:48:35 +0000 (15:48 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 15 Sep 2021 03:10:10 +0000 (05:10 +0200)
commit45570d7e4439ca8cc676eaf414497000e4e9fb1a
treeb2e7f427f60b0cb12efd93109348c8946a2b5412
parentc9c45beb1b97eed3fbf05095e376823fc58c9aa7
net/iavf: fix resource leak on probing failure

During the port probe process, there are two abnormal branches that did
not release the previously requested memory, resulting in leakage. The
patch adds an iavf_uninit_vf function, which corresponds to the
iavf_init_vf function.

Fixes: ff2d0c345c3b ("net/iavf: support generic flow API")
Cc: stable@dpdk.org
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/iavf/iavf_ethdev.c