[PATCH] zd1211rw: fix potential leak in usb_init
authorMaxime Austruy <maxime@tralhalla.org>
Mon, 29 Jan 2007 00:59:51 +0000 (00:59 +0000)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 7 Feb 2007 20:23:53 +0000 (15:23 -0500)
usb_init should call destroy_workqueue when usb_register fails.

Signed-off-by: Maxime Austruy <maxime@tralhalla.org>
Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/zd1211rw/zd_usb.c

index 605e96e740576cf0d871181460dfc405efcc0835..2468ad662d3d24117ece684f97e91c075fdb361f 100644 (file)
@@ -1128,6 +1128,7 @@ static int __init usb_init(void)
 
        r = usb_register(&driver);
        if (r) {
+               destroy_workqueue(zd_workqueue);
                printk(KERN_ERR "%s usb_register() failed. Error number %d\n",
                       driver.name, r);
                return r;