DORMANTno replies

[PATCH wireless] wifi: mac80211: Fix a memory leak in ieee80211_key_link()

From: Christophe JAILLET <hidden>
Date: 2023-10-01 06:09:12
Also in: kernel-janitors, linux-wireless, lkml
Subsystem: mac80211, the rest · Maintainers: Johannes Berg, Linus Torvalds

Commit 5d6020ba6657 seems to be conflicting with d097ae01ebd4 and what
used to "goto out" now ends with a direct return.

Restore the expected behavior.

Signed-off-by: Christophe JAILLET <redacted>
---
This patch is here more to draw attention to something that looks wrong
because of a merge conflict.

If there is really an issue, then the commit description certainly need to
we improved, by someone that know the recent changes better than me.
---
 net/mac80211/key.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 2913c6b13558..af74d7f9d94d 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -910,8 +910,10 @@ int ieee80211_key_link(struct ieee80211_key *key,
 	 * Silently accept key re-installation without really installing the
 	 * new version of the key to avoid nonce reuse or replay issues.
 	 */
-	if (ieee80211_key_identical(sdata, old_key, key))
-		return -EALREADY;
+	if (ieee80211_key_identical(sdata, old_key, key)) {
+		ret = -EALREADY;
+		goto out;
+	}
 
 	key->local = sdata->local;
 	key->sdata = sdata;
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help