[PATCH 2/15] tdfxfb: fix memory leaks in removal path

Subsystems: framebuffer layer, the rest

STALE6389d

2 messages, 2 authors, 2009-02-08 · open the first message on its own page

[PATCH 2/15] tdfxfb: fix memory leaks in removal path

From: Andres Salomon <hidden>
Date: 2009-02-07 17:24:21

We were leaking the cmap memory.

Signed-off-by: Andres Salomon <redacted>
---
 drivers/video/tdfxfb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
index 14bd3f3..ee64771 100644
--- a/drivers/video/tdfxfb.c
+++ b/drivers/video/tdfxfb.c
@@ -1393,6 +1393,7 @@ static void __devexit tdfxfb_remove(struct pci_dev *pdev)
 	release_mem_region(pci_resource_start(pdev, 0),
 			   pci_resource_len(pdev, 0));
 	pci_set_drvdata(pdev, NULL);
+	fb_dealloc_cmap(&info->cmap);
 	framebuffer_release(info);
 }
 
-- 
1.5.6.5


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com

Re: [Linux-fbdev-devel] [PATCH 2/15] tdfxfb: fix memory leaks in removal path

From: Krzysztof Helt <hidden>
Date: 2009-02-08 14:29:35

On Sat, 7 Feb 2009 12:12:24 -0500
Andres Salomon [off-list ref] wrote:
We were leaking the cmap memory.

Signed-off-by: Andres Salomon <redacted>
---
Acked-by: Krzysztof Helt <redacted>
quoted hunk
 drivers/video/tdfxfb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
index 14bd3f3..ee64771 100644
--- a/drivers/video/tdfxfb.c
+++ b/drivers/video/tdfxfb.c
@@ -1393,6 +1393,7 @@ static void __devexit tdfxfb_remove(struct pci_dev *pdev)
 	release_mem_region(pci_resource_start(pdev, 0),
 			   pci_resource_len(pdev, 0));
 	pci_set_drvdata(pdev, NULL);
+	fb_dealloc_cmap(&info->cmap);
 	framebuffer_release(info);
 }
 

----------------------------------------------------------------------
Zostan mistrzem parkowania w Bombaju!
Zagraj >> http://link.interia.pl/f204e 


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help