NET: mac80211 - fix inappropriate memory freeing
PATCH 1/1 NET: mac80211 - fix inappropriate memory freeing
This patch does 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 accidently wasted.
Signed-off-by Cyrill Gorcunov <[email protected]>
--- net/mac80211/ieee80211_rate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/ieee80211_rate.c +1 -1
@@ -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);
Signature · 1 line
1.5.3.5
Quoted 5 lines · On Monday 03 December 2007 14:22:49 Cyrill Gorcunov wrote:
This patch does fix inappropriate memory freeing in case of requested
rate_control_opswas not found. In this case the list head entity is going to be accidently wasted.Signed-off-by Cyrill Gorcunov <[email protected]>
Acked-by Michael Wu <[email protected]>
Thanks,
-Michael Wu