summaryrefslogtreecommitdiffstats
path: root/drivers/video/tgafb.c
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2009-04-01 00:25:28 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 17:59:31 +0200
commit327fc8752a3c08fc7dc7d382883e65aad2f03bde (patch)
tree549c61e2cf053c6e59ebdb878c6337173dfa179f /drivers/video/tgafb.c
parentsunxvr500: fix cmap memory leaks (diff)
downloadlinux-327fc8752a3c08fc7dc7d382883e65aad2f03bde.tar.xz
linux-327fc8752a3c08fc7dc7d382883e65aad2f03bde.zip
tgafb: fix cmap memory leak
Fix cmap leak when register_framebuffer fails. Signed-off-by: Andres Salomon <dilinger@debian.org> Acked-by: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--drivers/video/tgafb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c
index 680642c089c9..a86046ff60ad 100644
--- a/drivers/video/tgafb.c
+++ b/drivers/video/tgafb.c
@@ -1663,7 +1663,7 @@ tgafb_register(struct device *dev)
if (register_framebuffer(info) < 0) {
printk(KERN_ERR "tgafb: Could not register framebuffer\n");
ret = -EINVAL;
- goto err1;
+ goto err2;
}
if (tga_bus_pci) {
@@ -1682,6 +1682,8 @@ tgafb_register(struct device *dev)
return 0;
+ err2:
+ fb_dealloc_cmap(&info->cmap);
err1:
if (mem_base)
iounmap(mem_base);