Commit 2498ce42 authored by Ralph Wuerthner's avatar Ralph Wuerthner Committed by Linus Torvalds
Browse files

alloc_vmap_area: fix memory leak



If alloc_vmap_area() fails the allocated struct vmap_area has to be freed.
Signed-off-by: default avatarRalph Wuerthner <ralphw@linux.vnet.ibm.com>
Reviewed-by: default avatarChristoph Lameter <cl@linux-foundation.org>
Reviewed-by: default avatarMinchan Kim <minchan.kim@gmail.com>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ca1eda2d
......@@ -402,6 +402,7 @@ overflow:
printk(KERN_WARNING
"vmap allocation for size %lu failed: "
"use vmalloc=<size> to increase size.\n", size);
kfree(va);
return ERR_PTR(-EBUSY);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment