diff options
| author | Johannes Berg <[email protected]> | 2023-10-05 21:09:18 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2023-10-11 14:36:14 +0000 |
| commit | 02e0e426a2fb1446ebd7bc0eccfb48aedefb966b (patch) | |
| tree | 454e3242c0a84b34d13dd0d2192d2119fa7af60c | |
| parent | wifi: cfg80211: use system_unbound_wq for wiphy work (diff) | |
| download | kernel-02e0e426a2fb1446ebd7bc0eccfb48aedefb966b.tar.gz kernel-02e0e426a2fb1446ebd7bc0eccfb48aedefb966b.zip | |
wifi: mac80211: fix error path key leak
In the previous key leak fix for the other error
paths, I meant to unify all of them to the same
place, but used the wrong label, which I noticed
when doing the merge into wireless-next. Fix it.
Fixes: d097ae01ebd4 ("wifi: mac80211: fix potential key leak")
Signed-off-by: Johannes Berg <[email protected]>
| -rw-r--r-- | net/mac80211/key.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 0665ff5e456e..a2db0585dce0 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -912,7 +912,7 @@ int ieee80211_key_link(struct ieee80211_key *key, */ if (ieee80211_key_identical(sdata, old_key, key)) { ret = -EALREADY; - goto unlock; + goto out; } key->local = sdata->local; @@ -940,7 +940,6 @@ int ieee80211_key_link(struct ieee80211_key *key, out: ieee80211_key_free_unused(key); - unlock: mutex_unlock(&sdata->local->key_mtx); return ret; |
