diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-10-25 05:15:12 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 10:50:06 -0500 |
commit | 9fe271af7d4de96471c5aaee2f4d0d1576050497 (patch) | |
tree | 89307ad3686fe12c223ed256710cc3884152baa7 /net/wireless | |
parent | ae917c9f55862691e31b84de7ec29bedcb83971c (diff) |
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: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 0ffb18371376..f1370ed9f498 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2687,7 +2687,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
2687 | hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0, | 2687 | hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0, |
2688 | NL80211_CMD_NEW_KEY); | 2688 | NL80211_CMD_NEW_KEY); |
2689 | if (!hdr) | 2689 | if (!hdr) |
2690 | return -ENOBUFS; | 2690 | goto nla_put_failure; |
2691 | 2691 | ||
2692 | cookie.msg = msg; | 2692 | cookie.msg = msg; |
2693 | cookie.idx = key_idx; | 2693 | cookie.idx = key_idx; |