imx: nandbcb: Fix resource leak in read_fcb
Fix Coverity Issue 9006657. In read_fcb, leak of memory to system resource "fcb_raw_page". Adjust the sequence to check the mtd bad block prior than allocation of "fcb_raw_page", also check the NULL return of allocation. Signed-off-by: NYe Li <ye.li@nxp.com> Reviewed-by: NPeng Fan <peng.fan@nxp.com> Signed-off-by: NPeng Fan <peng.fan@nxp.com>
Showing
想要评论请 注册 或 登录