Skip to content

Commit

Permalink
NET: mac80211: fix inappropriate memory freeing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cyrill Gorcunov authored and David S. Miller committed Dec 20, 2007
1 parent 3333590 commit 20880e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/ieee80211_rate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 20880e8

Please sign in to comment.