Skip to content

Commit

Permalink
rndis_wlan: free priv correctly when rndis_wext_bind fails
Browse files Browse the repository at this point in the history
Private structure is allocated by wiphy_new now, so use
wiphy_free instead of kfree.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Jussi Kivilinna authored and John W. Linville committed Apr 22, 2009
1 parent 8d4d99a commit eb1a685
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/rndis_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2449,8 +2449,8 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf)
set_wiphy_dev(wiphy, &usbdev->udev->dev);

if (wiphy_register(wiphy)) {
wiphy_free(wiphy);
return -ENODEV;
retval = -ENODEV;
goto fail;
}

set_default_iw_params(usbdev);
Expand All @@ -2472,7 +2472,7 @@ static int rndis_wext_bind(struct usbnet *usbdev, struct usb_interface *intf)
flush_workqueue(priv->workqueue);
destroy_workqueue(priv->workqueue);

kfree(priv);
wiphy_free(wiphy);
return retval;
}

Expand Down

0 comments on commit eb1a685

Please sign in to comment.