diff options
author | Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com> | 2017-08-04 12:32:55 +0900 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-08-15 17:51:59 -0500 |
commit | ddd535f1ea3eb27eae71acc21fb0fa4ad2d7535d (patch) | |
tree | bcf60683f81ea37feb55f75eb274b2aa0c0facbf /drivers/pci/host/pcie-rcar.c | |
parent | 3c60e01a12461c89db2349b95c77c9eb36fdd439 (diff) | |
download | linux-stable-ddd535f1ea3eb27eae71acc21fb0fa4ad2d7535d.tar.gz linux-stable-ddd535f1ea3eb27eae71acc21fb0fa4ad2d7535d.tar.bz2 linux-stable-ddd535f1ea3eb27eae71acc21fb0fa4ad2d7535d.zip |
PCI: rcar: Fix memory leak when no PCIe card is inserted
When no PCIe card is inserted, there is a memory leak as
pci_free_resource_list() is not called before returning.
Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/pci/host/pcie-rcar.c')
-rw-r--r-- | drivers/pci/host/pcie-rcar.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index 007523e85c66..4e0b25d09b0c 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c @@ -1196,6 +1196,7 @@ err_pm_disable: err_free_bridge: pci_free_host_bridge(bridge); + pci_free_resource_list(&pcie->resources); return err; } |