提交 d7f0c4dc 编写于 作者: V Vinit Agnihotri 提交者: Artem Bityutskiy

UBI: fix freeing ubi->vtbl while unloading

ubi->vtbl is allocated using vmalloc() in vtbl.c empty_create_lvol(),
but it is freed in build.c with kfree()
Signed-off-by: NVinit Agnihotri <vinit.agnihotri@gmail.com>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
上级 21600546
......@@ -369,7 +369,7 @@ static int attach_by_scanning(struct ubi_device *ubi)
out_wl:
ubi_wl_close(ubi);
out_vtbl:
kfree(ubi->vtbl);
vfree(ubi->vtbl);
out_si:
ubi_scan_destroy_si(si);
return err;
......@@ -629,7 +629,7 @@ static int attach_mtd_dev(const char *mtd_dev, int vid_hdr_offset,
out_detach:
ubi_eba_close(ubi);
ubi_wl_close(ubi);
kfree(ubi->vtbl);
vfree(ubi->vtbl);
out_free:
kfree(ubi);
out_mtd:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册