mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
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: 28b3870578 ("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>
This commit is contained in:
parent
4414418595
commit
f4a26a9b31
|
|
@ -229,7 +229,7 @@ void cxgb4_free_mps_ref_entries(struct adapter *adap)
|
|||
{
|
||||
struct mps_entries_ref *mps_entry, *tmp;
|
||||
|
||||
if (!list_empty(&adap->mps_ref))
|
||||
if (list_empty(&adap->mps_ref))
|
||||
return;
|
||||
|
||||
spin_lock(&adap->mps_ref_lock);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user