tridentfb: 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/tridentfb.c

index 479b2e79ad68ea569882bf7ce7df7645d648a02d..c5369ba9485a28a6def08c08685385635a56d49d 100644 (file)
@@ -1563,6 +1563,7 @@ static void __devexit trident_pci_remove(struct pci_dev *dev)
        release_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len);
        pci_set_drvdata(dev, NULL);
        kfree(info->pixmap.addr);
+       fb_dealloc_cmap(&info->cmap);
        framebuffer_release(info);
 }