提交 6b8583b0 编写于 作者: R Raghav Dogra 提交者: Scott Wood

nand/elbc: Memory leak fix

Freeing allocated memory to priv before returning
from the function
Signed-off-by: NRaghav Dogra <raghav@freescale.com>
[scottwood: removed unnecessary cast]
Signed-off-by: NScott Wood <scottwood@freescale.com>
上级 5e856fa8
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册