提交 cb71b8d8 编写于 作者: S Simon Wunderlich 提交者: 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: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册