mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
nand/elbc: Memory leak fix
Freeing allocated memory to priv before returning from the function Signed-off-by: Raghav Dogra <raghav@freescale.com> [scottwood: removed unnecessary cast] Signed-off-by: Scott Wood <scottwood@freescale.com>
This commit is contained in:
parent
5e856fa8be
commit
6b8583b0ad
1 changed files with 1 additions and 0 deletions
|
@ -679,6 +679,7 @@ static int fsl_elbc_chip_init(int devnum, u8 *addr)
|
|||
if (priv->bank >= MAX_BANKS) {
|
||||
printf("fsl_elbc_nand: address did not match any "
|
||||
"chip selects\n");
|
||||
kfree(priv);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue