Skip to contentSkip to conversation

drivers/video: fsl-diu-fb: fix memory leak on error

PATCH Applied Timur Tabi 1 participant 1 message Sep 15, 2011 Framebuffer layer

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH 10/13 drivers/video: fsl-diu-fb: fix memory leak on error

We were forgetting to unmap the video memory if fsl_diu_check_var() fails.

---
 drivers/video/fsl-diu-fb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/video/fsl-diu-fb.c +1 -0
index 3776949..c66f6ed 100644
@@ -1200,6 +1200,7 @@ static int __devinit install_fb(struct fb_info *info)
 
 	if (fsl_diu_check_var(&info->var, info)) {
 		dev_err(info->dev, "fsl_diu_check_var failed\n");
+		unmap_video_memory(info);
 		fb_dealloc_cmap(&info->cmap);
 		return -EINVAL;
 	}
Signature · 1 line
1.7.3.4