Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc382d4a authored by Johannes Berg's avatar Johannes Berg Committed by Ahmad Kholaif
Browse files

nl80211: fix error path in nl80211_get_key()



Coverity pointed out that in the (practically impossible)
error case we leak the message - fix this.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Git-commit: 9fe271af7d4de96471c5aaee2f4d0d1576050497
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Change-Id: I78c3631eabd04e86872faf65fa1e401dadb35a75
Signed-off-by: default avatarAhmad Kholaif <akholaif@codeaurora.org>
parent f8e89d3d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2673,7 +2673,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
	hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0,
			     NL80211_CMD_NEW_KEY);
	if (!hdr)
		return -ENOBUFS;
		goto nla_put_failure;

	cookie.msg = msg;
	cookie.idx = key_idx;