Skip to content
Snippets Groups Projects
Commit f6d99aa9 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

Merge branch 'master' of git://git.denx.de/u-boot-ubi

* 'master' of git://git.denx.de/u-boot-ubi:
  UBI: init eba tables before wl when attaching a device
  ubifs bad superblock bug
parents e5a07171 d6389465
No related branches found
No related tags found
No related merge requests found
......@@ -476,21 +476,21 @@ static int attach_by_scanning(struct ubi_device *ubi)
if (err)
goto out_si;
err = ubi_wl_init_scan(ubi, si);
if (err)
goto out_vtbl;
err = ubi_eba_init_scan(ubi, si);
if (err)
goto out_wl;
err = ubi_wl_init_scan(ubi, si);
if (err)
goto out_vtbl;
ubi_scan_destroy_si(si);
return 0;
out_wl:
ubi_wl_close(ubi);
out_vtbl:
vfree(ubi->vtbl);
out_wl:
ubi_wl_close(ubi);
out_si:
ubi_scan_destroy_si(si);
return err;
......
......@@ -848,8 +848,10 @@ void ubifs_umount(struct ubifs_info *c)
ubifs_debugging_exit(c);
/* Finally free U-Boot's global copy of superblock */
free(ubifs_sb->s_fs_info);
free(ubifs_sb);
if (ubifs_sb != NULL) {
free(ubifs_sb->s_fs_info);
free(ubifs_sb);
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment