mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
cw1200: fix missing unlock on error in cw1200_hw_scan()
Add the missing unlock before return from function cw1200_hw_scan()
in the error handling case.
Fixes: 4f68ef64cd ("cw1200: Fix concurrency use-after-free bugs in cw1200_hw_scan()")
Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Jia-Ju Bai <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
This commit is contained in:
1 parent
4d95f99c59
commit
51c8d24101
1 file changed
+4
-1
@@ -84,8 +84,11 @@ int cw1200_hw_scan(struct ieee80211_hw *hw,
|
||||
|
||||
frame.skb = ieee80211_probereq_get(hw, priv->vif->addr, NULL, 0,
|
||||
req->ie_len);
|
||||
if (!frame.skb)
|
||||
if (!frame.skb) {
|
||||
mutex_unlock(&priv->conf_mutex);
|
||||
up(&priv->scan.lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (req->ie_len)
|
||||
skb_put_data(frame.skb, req->ie, req->ie_len);
|
||||
|
||||
Reference in new issue
Block a user