]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
drivers/video/sgivwfb.c: fix memory leaks in removal path
authorAndres Salomon <dilinger@queued.net>
Tue, 31 Mar 2009 22:25:20 +0000 (15:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:30 +0000 (08:59 -0700)
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>
drivers/video/sgivwfb.c

index f5252c2552fdd482731eef311f3f4ff14a70f03d..bba53714a7b13188796c72ace46b692a5b53cfea 100644 (file)
@@ -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;
 }