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

Commit 13f81c09 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Bjorn Helgaas
Browse files

PCI/MSI: Fix leak of msi_attrs



Coverity reported that I forgot to clean up some allocated memory on the
error path in populate_msi_sysfs(), so this patch fixes that.

Thanks to Dave Jones for pointing out where the error was, I obviously
can't read code this morning...

Found by Coverity (CID 1163317).

Fixes: 1c51b50c ("PCI/MSI: Export MSI mode using attributes, not kobjects")
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Cc: Dave Jones <davej@redhat.com>
parent b3bac8e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -595,6 +595,7 @@ error_attrs:
		++count;
		msi_attr = msi_attrs[count];
	}
	kfree(msi_attrs);
	return ret;
}