OSDN Git Service

USB: core: only clean up what we allocated
authorAndrey Konovalov <andreyknvl@google.com>
Mon, 11 Dec 2017 21:48:41 +0000 (22:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2019 04:23:19 +0000 (06:23 +0200)
commit0cd08672e0aa514364ff619975067731e39207ab
treee424cb6c0e418783d5cbe7b4bd0772ce4a7919b2
parent466ab66b5c2fa7ba0ee372495833af08cce17a52
USB: core: only clean up what we allocated

commit 32fd87b3bbf5f7a045546401dfe2894dbbf4d8c3 upstream.

When cleaning up the configurations, make sure we only free the number
of configurations and interfaces that we could have allocated.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/config.c