diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2026-10-21 13:20:23 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-10-21 13:20:23 -0500 |
| commit | 1bd64de4fffacefbf8d8d11fafbee655c0b3fd7a (patch) | |
| tree | bb5bc8378b3cca763a12ca2950d9dc44e498f3b9 /drivers | |
| parent | 67a93798528e3687bb38cd40090fa4695431e578 (diff) | |
| parent | 624ee129620a054466b6a29d98cd7a40ccc239cd (diff) | |
Merge branch 'pci/doe'
- Fix double free of sysfs name if a DOE feature is reported twice
(Donggeun Yoo)
* pci/doe:
PCI/DOE: Fix double free of a duplicate feature's sysfs name
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/pci/doe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/doe.c b/drivers/pci/doe.c index ac95b1d2d999..6b5d9ba8e969 100644 --- a/drivers/pci/doe.c +++ b/drivers/pci/doe.c @@ -208,8 +208,9 @@ static int pci_doe_sysfs_feature_populate(struct pci_dev *pdev, pci_warn(pdev, "Failed adding %s to sysfs group\n", attrs[i].attr.name); goto fail; - } else - kfree(attrs[i].attr.name); + } + kfree(attrs[i].attr.name); + attrs[i].attr.name = NULL; } } |
