Skip to content
Commit dcec4c3b authored by Florin Malita's avatar Florin Malita Committed by Artem Bityutskiy
Browse files

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: default avatarFlorin Malita <fmalita@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent bbf25010
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment