isdn/bas_gigaset: fix a leak on failure path in gigaset_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 25 Jul 2014 22:34:31 +0000 (02:34 +0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jul 2014 19:18:34 +0000 (12:18 -0700)
There is a lack of usb_put_dev(udev) on failure path in gigaset_probe().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/gigaset/bas-gigaset.c

index c44950d..b7ae0a0 100644 (file)
@@ -2400,6 +2400,7 @@ allocerr:
 error:
        freeurbs(cs);
        usb_set_intfdata(interface, NULL);
+       usb_put_dev(udev);
        gigaset_freecs(cs);
        return rc;
 }