mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-07 01:40:49 +01:00
driver/mtd:IFC: Fix possible memory leak
if priv->bank >= MAX_BANK, priv should be freed before returning ENODEV. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Signed-off-by: Scott Wood <scott@tyr.buserror.net>
This commit is contained in:
parent
807fc702e0
commit
76d067ac33
1 changed files with 1 additions and 0 deletions
|
|
@ -775,6 +775,7 @@ int board_nand_init(struct nand_chip *nand)
|
|||
if (priv->bank >= MAX_BANKS) {
|
||||
printf("%s: address did not match any "
|
||||
"chip selects\n", __func__);
|
||||
kfree(priv);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue