Skip to contentSkip to conversation

vesafb: fix memory leak

PATCH New Daniel J Blueman 1 participant 1 message Jun 27, 2011 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vesafb: fix memory leak

When releasing framebuffer, free colourmap allocations.

---
 drivers/video/vesafb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/video/vesafb.c +1 -0
index a99bbe8..501b340 100644
@@ -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);
Signature · 1 line
1.7.4.1