Commit b3abb666 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] usbcore: drop reference to bus on allocation error

A recent patch introduced this reference counting leak.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>


===== drivers/usb/core/usb.c 1.293 vs edited =====
parent 13161f66
......@@ -765,6 +765,7 @@ usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port)
if (dev->bus->op->allocate)
if (dev->bus->op->allocate(dev)) {
usb_bus_put(bus);
kfree(dev);
return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment