aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2007-12-13 19:17:03 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-12-19 19:43:47 -0500
commit20880e8936e467fe30d79aa838c8d24b7073648f (patch)
treea4f0b2de724ee3610414459b1072149cd2386598
parent3333590e94262aebb5d0fb767cc7ed8b2359705c (diff)
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>
-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)
60 list_for_each_entry(alg, &rate_ctrl_algs, list) { 60 list_for_each_entry(alg, &rate_ctrl_algs, list) {
61 if (alg->ops == ops) { 61 if (alg->ops == ops) {
62 list_del(&alg->list); 62 list_del(&alg->list);
63 kfree(alg);
63 break; 64 break;
64 } 65 }
65 } 66 }
66 mutex_unlock(&rate_ctrl_mutex); 67 mutex_unlock(&rate_ctrl_mutex);
67 kfree(alg);
68} 68}
69EXPORT_SYMBOL(ieee80211_rate_control_unregister); 69EXPORT_SYMBOL(ieee80211_rate_control_unregister);
70 70