Re: [PATCH v5] of/pci: Fix memory leak in of_pci_get_host_bridge_resources

2017-05-17 Thread jeffy
Hi Bjorn, On 05/18/2017 05:08 AM, Bjorn Helgaas wrote: On Wed, Apr 05, 2017 at 10:28:22AM +0800, Jeffy Chen wrote: Currently we only free the allocated resource struct when error. This would cause memory leak after pci_free_resource_list. I think I see the problem here. The release path is t

Re: [PATCH v5] of/pci: Fix memory leak in of_pci_get_host_bridge_resources

2017-05-17 Thread Bjorn Helgaas
On Wed, Apr 05, 2017 at 10:28:22AM +0800, Jeffy Chen wrote: > Currently we only free the allocated resource struct when error. > This would cause memory leak after pci_free_resource_list. I think I see the problem here. The release path is this: pci_release_host_bridge_dev pci_free_resourc

[PATCH v5] of/pci: Fix memory leak in of_pci_get_host_bridge_resources

2017-04-04 Thread Jeffy Chen
Currently we only free the allocated resource struct when error. This would cause memory leak after pci_free_resource_list. Signed-off-by: Jeffy Chen --- Changes in v5: Fix some careless compile errors. Changes in v4: Use IORESOURCE_AUTO to mark struct resources which could be copied. Changes