浏览代码

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>
Harunobu Kurokawa 8 年之前
父节点
当前提交
ddd535f1ea
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/pci/host/pcie-rcar.c

+ 1 - 0
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;
 }