aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorVinit Agnihotri <vinit.agnihotri@gmail.com>2007-06-15 06:01:22 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-07-18 09:54:15 -0400
commitd7f0c4dc31f1297a613f1e61a7d682dc9a5e859a (patch)
treecdc9e28d8708774e174ad7baf78c67b71a34d57e /drivers/mtd/ubi
parent21600546ab84e451adb88771b52b64b97866a444 (diff)
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: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/build.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 054a88dcc7a1..08ca214abb95 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -369,7 +369,7 @@ static int attach_by_scanning(struct ubi_device *ubi)
369out_wl: 369out_wl:
370 ubi_wl_close(ubi); 370 ubi_wl_close(ubi);
371out_vtbl: 371out_vtbl:
372 kfree(ubi->vtbl); 372 vfree(ubi->vtbl);
373out_si: 373out_si:
374 ubi_scan_destroy_si(si); 374 ubi_scan_destroy_si(si);
375 return err; 375 return err;
@@ -629,7 +629,7 @@ static int attach_mtd_dev(const char *mtd_dev, int vid_hdr_offset,
629out_detach: 629out_detach:
630 ubi_eba_close(ubi); 630 ubi_eba_close(ubi);
631 ubi_wl_close(ubi); 631 ubi_wl_close(ubi);
632 kfree(ubi->vtbl); 632 vfree(ubi->vtbl);
633out_free: 633out_free:
634 kfree(ubi); 634 kfree(ubi);
635out_mtd: 635out_mtd: