Messages in this thread Patch in this message | | | Date | Mon, 4 May 2009 16:37:31 +0200 | From | Ralph Wuerthner <> | Subject | [PATCH] alloc_vmap_area: fix memory leak |
| |
[PATCH] alloc_vmap_area: fix memory leak
From: Ralph Wuerthner <ralphw@linux.vnet.ibm.com>
If alloc_vmap_area() fails the allocated struct vmap_area has to be freed.
Signed-off-by: Ralph Wuerthner <ralphw@linux.vnet.ibm.com>
--- mm/vmalloc.c | 1 + 1 file changed, 1 insertion(+)
Index: linux-2.6/mm/vmalloc.c =================================================================== --- linux-2.6.orig/mm/vmalloc.c +++ linux-2.6/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); }
-- Ralph Wuerthner
| |