aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-10-25 11:15:12 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-11-25 16:50:06 +0100
commit9fe271af7d4de96471c5aaee2f4d0d1576050497 (patch)
tree89307ad3686fe12c223ed256710cc3884152baa7 /net
parentae917c9f55862691e31b84de7ec29bedcb83971c (diff)
downloadlinux-tizen-9fe271af7d4de96471c5aaee2f4d0d1576050497.tar.gz
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')
-rw-r--r--net/wireless/nl80211.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 0ffb183713764b..f1370ed9f4986a 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)
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;