Skip to contentSkip to conversation

imsttfb: Fix resource leak

PATCH In review Antonino A. Daplas 1 participant 1 message Mar 11, 2006 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 8/18 imsttfb: Fix resource leak

The struct info and device resource may not be released in the driver's error path. Fix.

Coverity Bug 671

---

 drivers/video/imsttfb.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/video/imsttfb.c +2 -0
index ad416ae..7db4254 100644
@@ -1510,6 +1510,8 @@ imsttfb_probe(struct pci_dev *pdev, cons
 		default:
 			printk(KERN_INFO "imsttfb: Device 0x%x unknown, "
 					 "contact maintainer.\n", pdev->device);
+			release_mem_region(addr, size);
+			framebuffer_release(info);
 			return -ENODEV;
 	}
 

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642