Re: [PATCH] UBI: potential leak in ubi_scan_erase_peb

2007-07-20 Thread Artem Bityutskiy
On Thu, 2007-07-19 at 15:22 -0400, Florin Malita wrote: > 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: Florin Malita <[EMAIL PROTECTED]>

[PATCH] UBI: potential leak in ubi_scan_erase_peb

2007-07-19 Thread Florin Malita
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: Florin Malita <[EMAIL PROTECTED]> --- drivers/mtd/ubi/scan.c |8 1 file changed, 4 ins