Commit f4a26a9b authored by Raju Rangoju's avatar Raju Rangoju Committed by David S. Miller
Browse files

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: 28b38705 ("cxgb4: Re-work the logic for mps refcounting")
Signed-off-by: default avatarRaju Rangoju <rajur@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 44144185
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);