diff options
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 2a04beba4369..4478760b7dc3 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1010,7 +1010,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
1010 | 1010 | ||
1011 | if (IS_ERR(hdr)) { | 1011 | if (IS_ERR(hdr)) { |
1012 | err = PTR_ERR(hdr); | 1012 | err = PTR_ERR(hdr); |
1013 | goto out; | 1013 | goto free_msg; |
1014 | } | 1014 | } |
1015 | 1015 | ||
1016 | cookie.msg = msg; | 1016 | cookie.msg = msg; |
@@ -1024,7 +1024,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
1024 | &cookie, get_key_callback); | 1024 | &cookie, get_key_callback); |
1025 | 1025 | ||
1026 | if (err) | 1026 | if (err) |
1027 | goto out; | 1027 | goto free_msg; |
1028 | 1028 | ||
1029 | if (cookie.error) | 1029 | if (cookie.error) |
1030 | goto nla_put_failure; | 1030 | goto nla_put_failure; |
@@ -1035,6 +1035,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
1035 | 1035 | ||
1036 | nla_put_failure: | 1036 | nla_put_failure: |
1037 | err = -ENOBUFS; | 1037 | err = -ENOBUFS; |
1038 | free_msg: | ||
1038 | nlmsg_free(msg); | 1039 | nlmsg_free(msg); |
1039 | out: | 1040 | out: |
1040 | cfg80211_unlock_rdev(rdev); | 1041 | cfg80211_unlock_rdev(rdev); |