diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-06 03:37:16 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-06 03:37:16 +0200 |
commit | 50234c58d3cac9708e39e9238afcd5c68b694971 (patch) | |
tree | 58fcf5be25972fa78a95e78cbfa2513b4a5932d1 /drivers | |
parent | Fix order of arguments to compat_put_time[spec|val] (diff) | |
parent | UBI: fix a horrible memory deallocation bug (diff) | |
download | linux-50234c58d3cac9708e39e9238afcd5c68b694971.tar.xz linux-50234c58d3cac9708e39e9238afcd5c68b694971.zip |
Merge tag 'upstream-3.6-rc5' of git://git.infradead.org/linux-ubi
Pull ubi fix from Artem Bityutskiy:
"A single small fix for memory deallocation: we allocated memory using
'kmem_cache_alloc()' but were freeing it using 'kfree()' in some
cases. Now we fix this by using 'kmem_cache_free()' instead."
* tag 'upstream-3.6-rc5' of git://git.infradead.org/linux-ubi:
UBI: fix a horrible memory deallocation bug
Diffstat (limited to 'drivers')
-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: * of this LEB as it will be deleted and freed in 'ubi_add_to_av()'. */ err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0); - kfree(new_aeb); + kmem_cache_free(ai->aeb_slab_cache, new_aeb); ubi_free_vid_hdr(ubi, vid_hdr); return err; @@ -353,7 +353,7 @@ write_error: list_add(&new_aeb->u.list, &ai->erase); goto retry; } - kfree(new_aeb); + kmem_cache_free(ai->aeb_slab_cache, new_aeb); out_free: ubi_free_vid_hdr(ubi, vid_hdr); return err; |