Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b701c0b1 authored by Alexei Starovoitov's avatar Alexei Starovoitov Committed by Bjorn Helgaas
Browse files

PCI/MSI: Fix memory leak in free_msi_irqs()



free_msi_irqs() is leaking memory, since list_for_each_entry(entry,
&dev->msi_list, list) {...} is never executed, because dev->msi_list is
made empty by the loop just above this one.

Fix it by relying on zero termination of attribute array like
populate_msi_sysfs() does.

Fixes: 1c51b50c ("PCI/MSI: Export MSI mode using attributes, not kobjects")
Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: stable@vger.kernel.org	# v3.14+
parent 843a85ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment