mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
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>
This commit is contained in:
parent
3333590e94
commit
20880e8936
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue