net/bnxt: fix memory leak
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 24 Oct 2019 07:44:31 +0000 (13:14 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 25 Oct 2019 17:23:23 +0000 (19:23 +0200)
commitf5019a53d7fc82474710c98bb48b4a09ee07c9f7
treeaecc9a9614c2885afa36bc1fff0070f5706b01c4
parent34f2f8ad40d868ca53732b3cd833bb5140821876
net/bnxt: fix memory leak

During hot fw upgrade or error recovery, driver does cleanup and
reallocation of resources. But driver reallocates memory for ring
group info table without freeing the allocated memory during
device init.

Fix this memory leak by moving the freeing of ring group info table
to bnxt_free_mem() in bnxt_uninit_resources().

Fixes: c09f57b49c13 ("net/bnxt: add start/stop/link update operations")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c