[Intel-wired-lan] [PATCH iwl-net v1 2/2] iavf: fix QoS capabilities memory leak
xuanqiang.luo at linux.dev
xuanqiang.luo at linux.dev
Wed Jul 15 06:11:31 UTC 2026
From: Xuanqiang Luo <luoxuanqiang at kylinos.cn>
Commit 4c1a457cb8b0 ("iavf: add support to exchange qos capabilities")
allocates adapter->qos_caps during probe, but iavf_remove() does not
free it. This leaks the allocation whenever an iavf device is removed.
Free adapter->qos_caps in iavf_remove().
Fixes: 4c1a457cb8b0 ("iavf: add support to exchange qos capabilities")
Cc: stable at vger.kernel.org
Signed-off-by: Xuanqiang Luo <luoxuanqiang at kylinos.cn>
---
drivers/net/ethernet/intel/iavf/iavf_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 29b8403a066bc..c7f69a9040588 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -5589,6 +5589,7 @@ static void iavf_remove(struct pci_dev *pdev)
iounmap(hw->hw_addr);
pci_release_regions(pdev);
kfree(adapter->vf_res);
+ kfree(adapter->qos_caps);
spin_lock_bh(&adapter->mac_vlan_list_lock);
/* If we got removed before an up/down sequence, we've got a filter
* hanging out there that we need to get rid of.
--
2.43.0
More information about the Intel-wired-lan
mailing list