提交 97bff8ec 编写于 作者: J Johannes Berg 提交者: John W. Linville

mac80211: fix sta_info_destroy(NULL)

sta_info_destroy(NULL) should be valid, but currently isn't because
the argument is dereferenced before the NULL check. There are no
users that currently pass in NULL, i.e. all check before calling the
function, but I want to change that.
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 9dd6aed0
...@@ -129,16 +129,18 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx, ...@@ -129,16 +129,18 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx,
void sta_info_destroy(struct sta_info *sta) void sta_info_destroy(struct sta_info *sta)
{ {
struct ieee80211_local *local = sta->local; struct ieee80211_local *local;
struct sk_buff *skb; struct sk_buff *skb;
int i; int i;
DECLARE_MAC_BUF(mbuf); DECLARE_MAC_BUF(mbuf);
ASSERT_RTNL();
might_sleep();
if (!sta) if (!sta)
return; return;
ASSERT_RTNL(); local = sta->local;
might_sleep();
rate_control_remove_sta_debugfs(sta); rate_control_remove_sta_debugfs(sta);
ieee80211_sta_debugfs_remove(sta); ieee80211_sta_debugfs_remove(sta);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册