diff options
author | Sukadev Bhattiprolu <sukadev@linux.ibm.com> | 2022-02-24 22:23:51 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-25 10:57:46 +0000 |
commit | 8d0657f39f487d904fca713e0bc39c2707382553 (patch) | |
tree | 92f232bacfe0e0efbe5d8cb272f64fb5fb2b7ec2 /drivers | |
parent | 31372fe9668e52c1f700c628c9fa716dd453f784 (diff) | |
download | linux-8d0657f39f487d904fca713e0bc39c2707382553.tar.bz2 |
ibmvnic: free reset-work-item when flushing
Fix a tiny memory leak when flushing the reset work queue.
Fixes: 2770a7984db5 ("ibmvnic: Introduce hard reset recovery")
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index dee05a353dbd..86d522171892 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -2784,8 +2784,10 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter, * flush reset queue and process this reset */ if (adapter->force_reset_recovery && !list_empty(&adapter->rwi_list)) { - list_for_each_safe(entry, tmp_entry, &adapter->rwi_list) + list_for_each_safe(entry, tmp_entry, &adapter->rwi_list) { list_del(entry); + kfree(list_entry(entry, struct ibmvnic_rwi, list)); + } } rwi->reset_reason = reason; list_add_tail(&rwi->list, &adapter->rwi_list); |