diff options
Diffstat (limited to 'drivers/mtd/ubi/vtbl.c')
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 437bc193e170..568307cc7caf 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c | |||
@@ -340,7 +340,7 @@ retry: | |||
340 | * of this LEB as it will be deleted and freed in 'ubi_add_to_av()'. | 340 | * of this LEB as it will be deleted and freed in 'ubi_add_to_av()'. |
341 | */ | 341 | */ |
342 | err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0); | 342 | err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0); |
343 | kfree(new_aeb); | 343 | kmem_cache_free(ai->aeb_slab_cache, new_aeb); |
344 | ubi_free_vid_hdr(ubi, vid_hdr); | 344 | ubi_free_vid_hdr(ubi, vid_hdr); |
345 | return err; | 345 | return err; |
346 | 346 | ||
@@ -353,7 +353,7 @@ write_error: | |||
353 | list_add(&new_aeb->u.list, &ai->erase); | 353 | list_add(&new_aeb->u.list, &ai->erase); |
354 | goto retry; | 354 | goto retry; |
355 | } | 355 | } |
356 | kfree(new_aeb); | 356 | kmem_cache_free(ai->aeb_slab_cache, new_aeb); |
357 | out_free: | 357 | out_free: |
358 | ubi_free_vid_hdr(ubi, vid_hdr); | 358 | ubi_free_vid_hdr(ubi, vid_hdr); |
359 | return err; | 359 | return err; |