lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  4 Aug 2017 12:32:55 +0900
From:   Harunobu Kurokawa <harunobu.kurokawa.dn@...esas.com>
To:     horms@...ge.net.au, bhelgaas@...gle.com, linux-pci@...r.kernel.org
Cc:     linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Harunobu Kurokawa <harunobu.kurokawa.dn@...esas.com>
Subject: [PATCH v2 2/2] PCI: rcar-pcie: 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@...esas.com>
---
 drivers/pci/host/pcie-rcar.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index 6b73981..70b487c 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -1196,6 +1196,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 
 err_free_bridge:
 	pci_free_host_bridge(bridge);
+	pci_free_resource_list(&pcie->resources);
 
 	return err;
 }
-- 
2.9.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ