aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/usbip/stub_rx.c
diff options
context:
space:
mode:
authorHangyu Hua <hbh25y@gmail.com>2022-04-12 10:02:57 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-21 19:01:22 +0200
commit9ec4cbf1cc55d126759051acfe328d489c5d6e60 (patch)
treebf8f11553b9afc6838897197425a1ef022710796 /drivers/usb/usbip/stub_rx.c
parentdrivers: usb: dwc3: Add AM62 USB wrapper driver (diff)
downloadlinux-dev-9ec4cbf1cc55d126759051acfe328d489c5d6e60.tar.xz
linux-dev-9ec4cbf1cc55d126759051acfe328d489c5d6e60.zip
usb: usbip: fix a refcount leak in stub_probe()
usb_get_dev() is called in stub_device_alloc(). When stub_probe() fails after that, usb_put_dev() needs to be called to release the reference. Fix this by moving usb_put_dev() to sdev_free error path handling. Find this by code review. Fixes: 3ff67445750a ("usbip: fix error handling in stub_probe()") Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Link: https://lore.kernel.org/r/20220412020257.9767-1-hbh25y@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/usbip/stub_rx.c')
0 files changed, 0 insertions, 0 deletions