]> git.baikalelectronics.ru Git - uboot.git/commit
pci: avoid memory leak
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>
Mon, 8 May 2017 18:40:16 +0000 (20:40 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 12 May 2017 12:37:18 +0000 (08:37 -0400)
commita6f61c265a2375ffe2a607cd81f15c1cbd5ba441
treeec951c7937cd3094c91dc482113470e2aeabf390
parent98a358b96af69d182633b1077e6ca63350425d97
pci: avoid memory leak

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 <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/pci/pci-uclass.c