浏览代码

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 <dilinger@debian.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andres Salomon 16 年之前
父节点
当前提交
d4bc4e8af0
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/video/sgivwfb.c

+ 2 - 0
drivers/video/sgivwfb.c

@@ -837,6 +837,8 @@ static int sgivwfb_remove(struct platform_device *dev)
 		iounmap(par->regs);
 		iounmap(par->regs);
 		iounmap(info->screen_base);
 		iounmap(info->screen_base);
 		release_mem_region(DBE_REG_PHYS, DBE_REG_SIZE);
 		release_mem_region(DBE_REG_PHYS, DBE_REG_SIZE);
+		fb_dealloc_cmap(&info->cmap);
+		framebuffer_release(info);
 	}
 	}
 	return 0;
 	return 0;
 }
 }