Re: [U-Boot] [PATCH] pci: avoid memory leak

2017-05-08 Thread Bin Meng
On Tue, May 9, 2017 at 2:40 AM, Heinrich Schuchardt wrote: > strdup uses malloc to allocate memory for str. > If we cannot bind to the generic driver we should release > the memory. > > The problem was indicated by clang scan-build. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/pci/pci-

[U-Boot] [PATCH] pci: avoid memory leak

2017-05-08 Thread Heinrich Schuchardt
strdup uses malloc to allocate memory for str. If we cannot bind to the generic driver we should release the memory. The problem was indicated by clang scan-build. Signed-off-by: Heinrich Schuchardt --- drivers/pci/pci-uclass.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/pci