diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-04-01 13:21:00 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-01 21:14:10 (GMT) |
commit | 93e5deb1ae39b56f4743955e76c72251256f23c1 (patch) | |
tree | 415d4f11449452822bdd1a97760de67ffd8c452d /net/mac80211/ieee80211.c | |
parent | 97bff8ecf4e4e26749a67dcfbb7565d8a0f4acb4 (diff) | |
download | linux-fsl-qoriq-93e5deb1ae39b56f4743955e76c72251256f23c1.tar.xz |
mac80211: automatically free sta struct when insertion fails
When STA structure insertion fails, it has been allocated but isn't
really alive yet, it isn't reachable by any other code and also can't
yet have much configured. This patch changes the code so that when
the insertion fails, the resulting STA pointer is no longer valid
because it is freed.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r-- | net/mac80211/ieee80211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 8c0f782..5ee431b 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c @@ -268,7 +268,7 @@ static int ieee80211_open(struct net_device *dev) res = sta_info_insert(sta); if (res) { - sta_info_destroy(sta); + /* STA has been freed */ return res; } break; |