net/bnxt: fix a memory leak in port stop
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 16 Jan 2020 13:04:52 +0000 (18:34 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:19 +0000 (09:51 +0100)
commitd59992361ca5646f007d32186ea352cc1b47fac9
treec78118ba89731da03d35c589a6d80c3d7afbbdab
parent1c25103326f9e94c9adade33da09ac772a1e59a2
net/bnxt: fix a memory leak in port stop

The memory for mark table is allocated during port start.
But the allocated memory is freed only during port close
or driver unload which in turn causes a memory leakage
on each port start/stop.

Fixed it by moving the memory free to port stop.

Fixes: 94eb699bc82e ("net/bnxt: support flow mark action")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c