* [PATCH] NET: mac80211 - fix inappropriate memory freeing
@ 2007-12-03 19:22 Cyrill Gorcunov
2007-12-03 22:26 ` Michael Wu
0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2007-12-03 19:22 UTC (permalink / raw)
To: Michael Wu; +Cc: LKWL, LKML, Andrew Morton
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 <gorcunov@gmail.com>
---
net/mac80211/ieee80211_rate.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
index 3260a4a..c3f2783 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);
--
1.5.3.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NET: mac80211 - fix inappropriate memory freeing
2007-12-03 19:22 [PATCH] NET: mac80211 - fix inappropriate memory freeing Cyrill Gorcunov
@ 2007-12-03 22:26 ` Michael Wu
0 siblings, 0 replies; 2+ messages in thread
From: Michael Wu @ 2007-12-03 22:26 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: LKWL, Andrew Morton, John W. Linville
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
On Monday 03 December 2007 14:22:49 Cyrill Gorcunov wrote:
> 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 <gorcunov@gmail.com>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Thanks,
-Michael Wu
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-03 22:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-03 19:22 [PATCH] NET: mac80211 - fix inappropriate memory freeing Cyrill Gorcunov
2007-12-03 22:26 ` Michael Wu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.