vfb: fix memory leaks in removal path
authorAndres Salomon <dilinger@queued.net>
Tue, 31 Mar 2009 22:25:22 +0000 (15:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:30 +0000 (08:59 -0700)
We were leaking the cmap 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/vfb.c

index 93fe08d6c78f6f2a36b84c8977ad95c2781ff6f1..cc919ae465711e17cee1648b61bb679576ed3242 100644 (file)
@@ -543,6 +543,7 @@ static int vfb_remove(struct platform_device *dev)
        if (info) {
                unregister_framebuffer(info);
                rvfree(videomemory, videomemorysize);
+               fb_dealloc_cmap(&info->cmap);
                framebuffer_release(info);
        }
        return 0;