vesafb: fix memory leak
authorDaniel J Blueman <daniel.blueman@gmail.com>
Mon, 27 Jun 2011 23:08:53 +0000 (23:08 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 4 Jul 2011 07:02:48 +0000 (16:02 +0900)
When releasing framebuffer, free colourmap allocations.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/video/vesafb.c

index a99bbe86db13d77183ac258333435c6be56ce187..501b3406c6d5584361676c0543d573f88e3f497a 100644 (file)
@@ -175,6 +175,7 @@ static int vesafb_setcolreg(unsigned regno, unsigned red, unsigned green,
 
 static void vesafb_destroy(struct fb_info *info)
 {
+       fb_dealloc_cmap(&info->cmap);
        if (info->screen_base)
                iounmap(info->screen_base);
        release_mem_region(info->apertures->ranges[0].base, info->apertures->ranges[0].size);