diff options
author | Eytan Lifshitz <eytan.lifshitz@intel.com> | 2014-02-06 14:01:32 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-11 06:59:36 -0500 |
commit | c368ddaa9ad79fdffde4756804321feba6725c75 (patch) | |
tree | 4a4650b8ad03ee14e8211d0b7a2dc0ed341a2970 /net | |
parent | 32769814d54a5a360b83811b4039c776ec953c71 (diff) |
mac80211: fix memory leak
In case ieee80211_prep_connection() fails to dereference
sdata->vif.chanctx_conf, the function returns and doesn't
free new_sta. fixed.
Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/mlme.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index fc1d82465b3c..57d5482b10fa 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3753,6 +3753,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3753 | chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); | 3753 | chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); |
3754 | if (WARN_ON(!chanctx_conf)) { | 3754 | if (WARN_ON(!chanctx_conf)) { |
3755 | rcu_read_unlock(); | 3755 | rcu_read_unlock(); |
3756 | sta_info_free(local, new_sta); | ||
3756 | return -EINVAL; | 3757 | return -EINVAL; |
3757 | } | 3758 | } |
3758 | rate_flags = ieee80211_chandef_rate_flags(&chanctx_conf->def); | 3759 | rate_flags = ieee80211_chandef_rate_flags(&chanctx_conf->def); |