ChangeSet 1.869, 2002/12/12 09:38:05-08:00, [EMAIL PROTECTED]
[PATCH] Driver core: Fix class leak in class_hotplug.
Thanks to Pat Mochel for pointing this out to me.
diff -Nru a/drivers/base/hotplug.c b/drivers/base/hotplug.c
--- a/drivers/base/hotplug.c Fri Dec 13 17:19:08 2002
+++ b/drivers/base/hotplug.c Fri Dec 13 17:19:08 2002
@@ -149,6 +149,7 @@
int class_hotplug (struct device *dev, const char *action)
{
struct device_class * cls;
+ int retval;
pr_debug ("%s\n", __FUNCTION__);
@@ -162,5 +163,9 @@
if (!cls)
return -ENODEV;
- return do_hotplug (dev, cls->name, action, cls->hotplug);
+ retval = do_hotplug (dev, cls->name, action, cls->hotplug);
+
+ put_devclass(cls);
+
+ return retval;
}
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel