aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Wuerthner <[email protected]>2009-05-06 16:02:59 -0700
committerLinus Torvalds <[email protected]>2009-05-06 16:36:10 -0700
commit2498ce42d3a4d1a498f1df4884da960087547db7 (patch)
tree52e46a1b944aa0e2e291a3c847c4063827b725b4
parentca1eda2d75b855f434b1d5458534332ffad92d65 (diff)
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 <[email protected]> Reviewed-by: Christoph Lameter <[email protected]> Reviewed-by: Minchan Kim <[email protected]> Cc: Nick Piggin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/vmalloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index fab19876b4d1..083716ea38c9 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -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);
}