mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
alloc_vmap_area: fix memory leak
If alloc_vmap_area() fails the allocated struct vmap_area has to be freed. Signed-off-by: Ralph Wuerthner <ralphw@linux.vnet.ibm.com> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Cc: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ca1eda2d75
commit
2498ce42d3
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue