usb: core: fix potential memory leak in error path during hcd creation
authorAnton Bondarenko <anton.bondarenko.sama@gmail.com>
Sat, 6 May 2017 23:53:46 +0000 (01:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2017 09:27:41 +0000 (11:27 +0200)
commit1a744d2eb76aaafb997fda004ae3ae62a1538f85
treec0aa7215ebcb46d6f2db095c08976abc01636004
parentdd5ca753fa92fb736b1395db892bd29f78e6d408
usb: core: fix potential memory leak in error path during hcd creation

Free memory allocated for address0_mutex if allocation of bandwidth_mutex
failed.

Fixes: feb26ac31a2a ("usb: core: hub: hub_port_init lock controller instead of bus")

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hcd.c