UBI: fix leak in ubi_scan_erase_peb
Coverity (1769) found the following problem: if the erase counter overflow check triggers, ec_hdr is leaked. Moving the allocation after the overflow check should take care of it. Signed-off-by: NFlorin Malita <fmalita@gmail.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Showing
想要评论请 注册 或 登录