UBI: fix double free on error path

If we fail in 'ubi_eba_init_scan()', we free
'ubi->volumes[i]->eba_tbl' in there, but also later free it
in 'free_internal_volumes()'. Fix this by assigning NULL
to 'ubi->volumes[i]->eba_tbl' after it is freed.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

authored by Adrian Hunter and committed by Artem Bityutskiy 7194e6f9 4be3bd78

+1
+1
drivers/mtd/ubi/eba.c
··· 1254 if (!ubi->volumes[i]) 1255 continue; 1256 kfree(ubi->volumes[i]->eba_tbl); 1257 } 1258 return err; 1259 }
··· 1254 if (!ubi->volumes[i]) 1255 continue; 1256 kfree(ubi->volumes[i]->eba_tbl); 1257 + ubi->volumes[i]->eba_tbl = NULL; 1258 } 1259 return err; 1260 }