net/bnxt: fix double free in port start failure
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 1 Apr 2021 02:53:34 +0000 (08:23 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 7 Apr 2021 02:56:03 +0000 (04:56 +0200)
commit39a03b401e4a72a118bae60c5834be2b6913098e
tree6cf2553693be18efa04e8bcdad1fff9223cf5fa7
parentda845ae9d7c1499cbf76e766604cc981ddd9eb17
net/bnxt: fix double free in port start failure

During port start when bnxt_start_nic() fails, it tries to free
"intr_handle->intr_vec" but the variable is not set to NULL after that.
If port start fails, driver invokes bnxt_dev_stop() which will lead
to a double free of "intr_handle->intr_vec".

Fix it by removing the call to free "intr_handle->intr_vec" in the
bnxt_start_nic() failure path as it is anyway doing in bnxt_dev_stop().

Fixes: 9d276b439aaf ("net/bnxt: fix error handling in device start")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c