Commit 11ba964d authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

mac80211: fix register_hw error path

"cfg80211: fix alignment problem in scan request"
introduced a bug into the error path, because now
we allocate the entire scan request and not just
the channel list (the channel list is allocated
together with the scan request) -- on errors we
thus also need to free the entire scan request.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5904d206
...@@ -930,7 +930,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -930,7 +930,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
fail_workqueue: fail_workqueue:
wiphy_unregister(local->hw.wiphy); wiphy_unregister(local->hw.wiphy);
fail_wiphy_register: fail_wiphy_register:
kfree(local->int_scan_req->channels); kfree(local->int_scan_req);
return result; return result;
} }
EXPORT_SYMBOL(ieee80211_register_hw); EXPORT_SYMBOL(ieee80211_register_hw);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment