Skip to content

Commit 02e0e42

Browse files
committed
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: d097ae0 ("wifi: mac80211: fix potential key leak") Signed-off-by: Johannes Berg <[email protected]>
1 parent 91d20ab commit 02e0e42

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/mac80211/key.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ int ieee80211_key_link(struct ieee80211_key *key,
912912
*/
913913
if (ieee80211_key_identical(sdata, old_key, key)) {
914914
ret = -EALREADY;
915-
goto unlock;
915+
goto out;
916916
}
917917

918918
key->local = sdata->local;
@@ -940,7 +940,6 @@ int ieee80211_key_link(struct ieee80211_key *key,
940940

941941
out:
942942
ieee80211_key_free_unused(key);
943-
unlock:
944943
mutex_unlock(&sdata->local->key_mtx);
945944

946945
return ret;

0 commit comments

Comments
 (0)