Commit cb71b8d8 authored by Simon Wunderlich's avatar Simon Wunderlich Committed by John W. Linville

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: default avatarSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 38c9d664
...@@ -995,6 +995,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, ...@@ -995,6 +995,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
if (!ieee80211_set_channel_type(sdata->local, sdata, if (!ieee80211_set_channel_type(sdata->local, sdata,
params->channel_type)) { params->channel_type)) {
mutex_unlock(&sdata->u.ibss.mtx); mutex_unlock(&sdata->u.ibss.mtx);
kfree_skb(skb);
return -EINVAL; return -EINVAL;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment