aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/wireless/nl80211.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 9b62710891a2..864ddfbeff2f 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2718,7 +2718,7 @@ static int nl80211_get_mesh_config(struct sk_buff *skb,
2718 hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0, 2718 hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0,
2719 NL80211_CMD_GET_MESH_CONFIG); 2719 NL80211_CMD_GET_MESH_CONFIG);
2720 if (!hdr) 2720 if (!hdr)
2721 goto nla_put_failure; 2721 goto out;
2722 pinfoattr = nla_nest_start(msg, NL80211_ATTR_MESH_CONFIG); 2722 pinfoattr = nla_nest_start(msg, NL80211_ATTR_MESH_CONFIG);
2723 if (!pinfoattr) 2723 if (!pinfoattr)
2724 goto nla_put_failure; 2724 goto nla_put_failure;
@@ -2759,6 +2759,7 @@ static int nl80211_get_mesh_config(struct sk_buff *skb,
2759 2759
2760 nla_put_failure: 2760 nla_put_failure:
2761 genlmsg_cancel(msg, hdr); 2761 genlmsg_cancel(msg, hdr);
2762 out:
2762 nlmsg_free(msg); 2763 nlmsg_free(msg);
2763 return -ENOBUFS; 2764 return -ENOBUFS;
2764} 2765}
@@ -2954,7 +2955,7 @@ static int nl80211_get_reg(struct sk_buff *skb, struct genl_info *info)
2954 hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0, 2955 hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0,
2955 NL80211_CMD_GET_REG); 2956 NL80211_CMD_GET_REG);
2956 if (!hdr) 2957 if (!hdr)
2957 goto nla_put_failure; 2958 goto put_failure;
2958 2959
2959 NLA_PUT_STRING(msg, NL80211_ATTR_REG_ALPHA2, 2960 NLA_PUT_STRING(msg, NL80211_ATTR_REG_ALPHA2,
2960 cfg80211_regdomain->alpha2); 2961 cfg80211_regdomain->alpha2);
@@ -3001,6 +3002,7 @@ static int nl80211_get_reg(struct sk_buff *skb, struct genl_info *info)
3001 3002
3002nla_put_failure: 3003nla_put_failure:
3003 genlmsg_cancel(msg, hdr); 3004 genlmsg_cancel(msg, hdr);
3005put_failure:
3004 nlmsg_free(msg); 3006 nlmsg_free(msg);
3005 err = -EMSGSIZE; 3007 err = -EMSGSIZE;
3006out: 3008out: