• Richard Weinberger's avatar
    UBI: Fix stale pointers in ubi->lookuptbl · ee59ba8b
    Richard Weinberger authored
    In some error paths the WL sub-system gives up on a PEB
    and frees it's ubi_wl_entry struct but does not set
    the entry in ubi->lookuptbl to NULL.
    Fastmap can stumble over such a stale pointer as it uses
    ubi->lookuptbl to find all PEBs.
    
    Fix this by introducing a new helper function which free()s
    a WL entry and removes the reference from the lookup table.
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    ee59ba8b
wl.c 57.7 KB