summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2011-12-14 16:33:30 +0400
committerJohn W. Linville <linville@tuxdriver.com>2011-12-14 23:50:11 +0400
commitcb71b8d80334add8991862f9fd36dc50874944ce (patch)
treed6a730afd5e4dc6743acd0bbc4166a66621f0ced /net/mac80211
parent38c9d6641ff0664911aebe4ba67124f28169a972 (diff)
downloadlinux-cb71b8d80334add8991862f9fd36dc50874944ce.tar.xz
mac80211: free skb on error path of ieee80211_ibss_join()
Our new return also created a memleak. The skb should be freed before returning an error. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ibss.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 0fc9752facea..fe0e91e0b8bc 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -995,6 +995,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
if (!ieee80211_set_channel_type(sdata->local, sdata,
params->channel_type)) {
mutex_unlock(&sdata->u.ibss.mtx);
+ kfree_skb(skb);
return -EINVAL;
}
}