aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYuri Ershov <ext-yuri.ershov@nokia.com>2010-06-29 07:08:07 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-28 16:24:01 -0400
commitd080e2755d840ede60128cc914a070868ebabc1e (patch)
tree3b69f97577346301bd250af4616e6d27c49fbfd8 /net
parente4ab7eb0aecbe56ac280486c61cd3f0f6c42870b (diff)
nl80211: Fix memory leaks
In case of errors during message composing msg should be freed after canceling. Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com> Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/nl80211.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index fbfac588297c..37902a54e9c1 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2769,6 +2769,7 @@ static int nl80211_get_mesh_params(struct sk_buff *skb,
2769 2769
2770 nla_put_failure: 2770 nla_put_failure:
2771 genlmsg_cancel(msg, hdr); 2771 genlmsg_cancel(msg, hdr);
2772 nlmsg_free(msg);
2772 err = -EMSGSIZE; 2773 err = -EMSGSIZE;
2773 out: 2774 out:
2774 /* Cleanup */ 2775 /* Cleanup */
@@ -2960,6 +2961,7 @@ static int nl80211_get_reg(struct sk_buff *skb, struct genl_info *info)
2960 2961
2961nla_put_failure: 2962nla_put_failure:
2962 genlmsg_cancel(msg, hdr); 2963 genlmsg_cancel(msg, hdr);
2964 nlmsg_free(msg);
2963 err = -EMSGSIZE; 2965 err = -EMSGSIZE;
2964out: 2966out:
2965 mutex_unlock(&cfg80211_mutex); 2967 mutex_unlock(&cfg80211_mutex);