Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -402,6 +402,7 @@ static struct vmap_area *alloc_vmap_area(unsigned long size,
			printk(KERN_WARNING
				"vmap allocation for size %lu failed: "
				"use vmalloc=<size> to increase size.\n", size);
		kfree(va);
		return ERR_PTR(-EBUSY);
	}