projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e856fa
)
nand/elbc: Memory leak fix
author
Raghav Dogra
<raghav@freescale.com>
Wed, 20 May 2015 09:24:58 +0000
(14:54 +0530)
committer
Scott Wood
<scottwood@freescale.com>
Fri, 22 May 2015 20:45:51 +0000
(15:45 -0500)
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>
drivers/mtd/nand/fsl_elbc_nand.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/nand/fsl_elbc_nand.c
b/drivers/mtd/nand/fsl_elbc_nand.c
index e85832d319d0270231aa5aadef1c424a555832ea..b3a0edbf149e3cce93ed1af462ca011808c1bee8 100644
(file)
--- a/
drivers/mtd/nand/fsl_elbc_nand.c
+++ b/
drivers/mtd/nand/fsl_elbc_nand.c
@@
-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;
}