mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
USB: core: Free the allocated memory before exiting on error
'new_interfaces' should be freed to avoid memory leak. Cc: Sarah Sharp <[email protected]> Signed-off-by: Sachin Kamat <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
564e69893c
commit
c058f7ab94
1 changed files with 2 additions and 1 deletions
|
|
@ -1786,7 +1786,8 @@ free_interfaces:
|
|||
if (dev->actconfig && usb_disable_lpm(dev)) {
|
||||
dev_err(&dev->dev, "%s Failed to disable LPM\n.", __func__);
|
||||
mutex_unlock(hcd->bandwidth_mutex);
|
||||
return -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto free_interfaces;
|
||||
}
|
||||
ret = usb_hcd_alloc_bandwidth(dev, cp, NULL, NULL);
|
||||
if (ret < 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue