Thread (2 messages) 2 messages, 2 authors, 2011-02-15
STALE5703d

[PATCH] video: add missing framebuffer_release in error path

From: Axel Lin <hidden>
Date: 2011-02-15 09:35:10
Also in: lkml
Subsystem: framebuffer layer, the rest · Maintainers: Helge Deller, Linus Torvalds

This patch fixes a memory leak in the error path.

Signed-off-by: Axel Lin <redacted>
---
 drivers/video/cg14.c |    1 +
 drivers/video/cg6.c  |    1 +
 drivers/video/tcx.c  |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c
index 2424953..2063a63 100644
--- a/drivers/video/cg14.c
+++ b/drivers/video/cg14.c
@@ -565,6 +565,7 @@ out_dealloc_cmap:
 
 out_unmap_regs:
 	cg14_unmap_regs(op, info, par);
+	framebuffer_release(info);
 
 out_err:
 	return err;
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 2b5a970..f3b8848 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -822,6 +822,7 @@ out_dealloc_cmap:
 
 out_unmap_regs:
 	cg6_unmap_regs(op, info, par);
+	framebuffer_release(info);
 
 out_err:
 	return err;
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c
index 77ad279..3d84235 100644
--- a/drivers/video/tcx.c
+++ b/drivers/video/tcx.c
@@ -481,6 +481,7 @@ out_dealloc_cmap:
 
 out_unmap_regs:
 	tcx_unmap_regs(op, info, par);
+	framebuffer_release(info);
 
 out_err:
 	return err;
-- 
1.7.1


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help