diff options
author | Alexei Starovoitov <ast@plumgrid.com> | 2014-06-04 15:49:50 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-16 13:40:33 -0700 |
commit | 27f6dca8935ccbd73b6021098e83fc54a6248832 (patch) | |
tree | 6945bc32d802813b4580f20de0881e4a32a906ed /lib/net_utils.c | |
parent | 732eafc78bba8e18a51c169f3dc7f33cddcdc401 (diff) |
PCI/MSI: Fix memory leak in free_msi_irqs()
commit b701c0b1fe819a2083fc6ec5332e0e4492b9516d upstream.
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: 1c51b50c2995 ("PCI/MSI: Export MSI mode using attributes, not kobjects")
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/net_utils.c')
0 files changed, 0 insertions, 0 deletions