[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090504163731.3675ea87@rwuerthntp>
Date: Mon, 4 May 2009 16:37:31 +0200
From: Ralph Wuerthner <ralphw@...ux.vnet.ibm.com>
To: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH] alloc_vmap_area: fix memory leak
[PATCH] alloc_vmap_area: fix memory leak
From: Ralph Wuerthner <ralphw@...ux.vnet.ibm.com>
If alloc_vmap_area() fails the allocated struct vmap_area has to be
freed.
Signed-off-by: Ralph Wuerthner <ralphw@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists