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

Commit f01f4182 authored by Jesper Juhl's avatar Jesper Juhl Committed by Greg Kroah-Hartman
Browse files

[PATCH] PCI: fix potential resource leak in drivers/pci/msi.c



The coverity checker spotted (as entry #599) that we might leak `entry' in
drivers/pci/msi.c::msix_capability_init()
This patch should take care of that.

Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9b860b8c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -793,8 +793,10 @@ static int msix_capability_init(struct pci_dev *dev,
		if (!entry)
			break;
		vector = get_msi_vector(dev);
		if (vector < 0)
		if (vector < 0) {
			kmem_cache_free(msi_cachep, entry);
			break;
		}

 		j = entries[i].entry;
 		entries[i].vector = vector;