Skip to content

Commit

Permalink
[PATCH] zd1211rw: fix potential leak in usb_init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxime Austruy authored and John W. Linville committed Feb 7, 2007
1 parent 62d0cfc commit 192b775
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/zd1211rw/zd_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 192b775

Please sign in to comment.