summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorCyrill Gorcunov2007-12-14 01:17:03 +0100
committerDavid S. Miller2007-12-20 01:43:47 +0100
commit20880e8936e467fe30d79aa838c8d24b7073648f (patch)
treea4f0b2de724ee3610414459b1072149cd2386598 /net/mac80211
parentmac80211: fix header ops (diff)
downloadkernel-qcow2-linux-20880e8936e467fe30d79aa838c8d24b7073648f.tar.gz
kernel-qcow2-linux-20880e8936e467fe30d79aa838c8d24b7073648f.tar.xz
kernel-qcow2-linux-20880e8936e467fe30d79aa838c8d24b7073648f.zip
NET: mac80211: fix inappropriate memory freeing
Fix inappropriate memory freeing in case of requested rate_control_ops was not found. In this case the list head entity is going to be accidentally wasted. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Acked-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_rate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
index 3260a4a0ecc5..c3f278393741 100644
--- a/net/mac80211/ieee80211_rate.c
+++ b/net/mac80211/ieee80211_rate.c
@@ -60,11 +60,11 @@ void ieee80211_rate_control_unregister(struct rate_control_ops *ops)
list_for_each_entry(alg, &rate_ctrl_algs, list) {
if (alg->ops == ops) {
list_del(&alg->list);
+ kfree(alg);
break;
}
}
mutex_unlock(&rate_ctrl_mutex);
- kfree(alg);
}
EXPORT_SYMBOL(ieee80211_rate_control_unregister);