Root/target/linux/omap24xx/patches-2.6.38/595-cbus-tahvo-usb-leak.patch

1--- a/drivers/cbus/tahvo-usb.c
2+++ b/drivers/cbus/tahvo-usb.c
3@@ -725,6 +725,8 @@ static int __init tahvo_usb_probe(struct
4 
5 static int __exit tahvo_usb_remove(struct platform_device *pdev)
6 {
7+ struct tahvo_usb *tu = platform_get_drvdata(pdev);
8+
9     dev_dbg(&pdev->dev, "remove\n");
10 
11     tahvo_free_irq(TAHVO_INT_VBUSON);
12@@ -734,6 +736,8 @@ static int __exit tahvo_usb_remove(struc
13 #ifdef CONFIG_USB_OTG
14     device_remove_file(&pdev->dev, &dev_attr_otg_mode);
15 #endif
16+
17+ kfree(tu);
18     tahvo_usb_device = NULL;
19 
20     return 0;
21

Archive Download this file



interactive