Skip to contentSkip to conversation

video: add missing framebuffer_release in error path

PATCH In review Axel Lin 2 participants 2 messages Feb 15, 2011 Framebuffer layer

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 video: add missing framebuffer_release in error path

This patch fixes a memory leak in the error path.

---
 drivers/video/cg14.c |    1 +
 drivers/video/cg6.c  |    1 +
 drivers/video/tcx.c  |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)
drivers/video/cg14.c +1 -0
index 2424953..2063a63 100644
@@ -565,6 +565,7 @@ out_dealloc_cmap:
 
 out_unmap_regs:
 	cg14_unmap_regs(op, info, par);
+	framebuffer_release(info);
 
 out_err:
 	return err;
drivers/video/cg6.c +1 -0
index 2b5a970..f3b8848 100644
@@ -822,6 +822,7 @@ out_dealloc_cmap:
 
 out_unmap_regs:
 	cg6_unmap_regs(op, info, par);
+	framebuffer_release(info);
 
 out_err:
 	return err;
drivers/video/tcx.c +1 -0
index 77ad279..3d84235 100644
@@ -481,6 +481,7 @@ out_dealloc_cmap:
 
 out_unmap_regs:
 	tcx_unmap_regs(op, info, par);
+	framebuffer_release(info);
 
 out_err:
 	return err;
Signature · 1 line
1.7.1