cxgb4: fix memory leak during module unload
authorRaju Rangoju <rajur@chelsio.com>
Wed, 16 Sep 2020 16:20:39 +0000 (21:50 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Sep 2020 23:29:20 +0000 (16:29 -0700)
commitf4a26a9b311d7ff9db461278faf2869d06496ef8
tree6541e23916fb3f94b64f518fe7fb540cca7c0126
parent44144185951a0ff9b50bf21c0cd1f79ff688e5ca
cxgb4: fix memory leak during module unload

Fix the memory leak in mps during module unload
path by freeing mps reference entries if the list
adpter->mps_ref is not already empty

Fixes: 28b3870578ef ("cxgb4: Re-work the logic for mps refcounting")
Signed-off-by: Raju Rangoju <rajur@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c