From: Andres Salomon Date: Tue, 31 Mar 2009 22:25:20 +0000 (-0700) Subject: drivers/video/sgivwfb.c: fix memory leaks in removal path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d4bc4e8af0a4a34c713f8c1a33a78cedffe8e0b7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drivers/video/sgivwfb.c: fix memory leaks in removal path We were leaking both the cmap memory and the info struct memory. Signed-off-by: Andres Salomon Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c index f5252c2552fd..bba53714a7b1 100644 --- a/drivers/video/sgivwfb.c +++ b/drivers/video/sgivwfb.c @@ -837,6 +837,8 @@ static int sgivwfb_remove(struct platform_device *dev) iounmap(par->regs); iounmap(info->screen_base); release_mem_region(DBE_REG_PHYS, DBE_REG_SIZE); + fb_dealloc_cmap(&info->cmap); + framebuffer_release(info); } return 0; }