]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: Fix memory leak in pci_register_iommu_region().
authorDavid S. Miller <davem@davemloft.net>
Sun, 11 Apr 2010 03:26:55 +0000 (20:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Apr 2010 06:46:18 +0000 (23:46 -0700)
commitf244c3b6c9cd4c3b7b3304c7231e8959ed5bdbec
tree317f39f6360f4f988ca09118fd2e3c23f5619964
parent40f92755bf82790499da33a5ce8cd516f0e23eb3
sparc64: Fix memory leak in pci_register_iommu_region().

Found by kmemleak.

If request_resource() fails, we leak the struct resource we
allocated to represent the IOMMU mapping area.

This actually happens on sun4v machines because the IOMEM area is only
reported sans the IOMMU region, unlike all previous systems.  I'll
need to fix that at some point, but for now fix the leak.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/pci_common.c