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)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 03:01:00 +0000 (03:01 +0000)
commit7a382f0f41ce8df65cf276f482904dc33319ad23
tree99e2366f6ccb4174e5c83c9c4b4f75a1a844e989
parent8741efe7fa96f13985b5c12a51000a14a8b7bdbb
usb: core: fix potential memory leak in error path during hcd creation

commit 1a744d2eb76aaafb997fda004ae3ae62a1538f85 upstream.

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