* Re: [2/3] gigaset: correct clearing of at_state strings on RING
@ 2010-03-15 14:48 Karsten Keil
0 siblings, 0 replies; only message in thread
From: Karsten Keil @ 2010-03-15 14:48 UTC (permalink / raw)
To: Tilman Schmidt
Cc: David Miller, netdev, linux-kernel, stable, isdn4linux,
Hansjoerg Lipp, i4ldeveloper
In RING handling, clear the table of received parameter strings in
a loop like everywhere else, instead of by enumeration which had
already gotten out of sync.
Impact: minor bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
---
Note to -stable: applies correctly to 2.6.33.
drivers/isdn/gigaset/ev-layer.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c
index c8f89b7..206c380 100644
--- a/drivers/isdn/gigaset/ev-layer.c
+++ b/drivers/isdn/gigaset/ev-layer.c
@@ -1258,14 +1258,10 @@ static void do_action(int action, struct cardstate *cs,
* note that bcs may be NULL if no B channel is free
*/
at_state2->ConState = 700;
- kfree(at_state2->str_var[STR_NMBR]);
- at_state2->str_var[STR_NMBR] = NULL;
- kfree(at_state2->str_var[STR_ZCPN]);
- at_state2->str_var[STR_ZCPN] = NULL;
- kfree(at_state2->str_var[STR_ZBC]);
- at_state2->str_var[STR_ZBC] = NULL;
- kfree(at_state2->str_var[STR_ZHLC]);
- at_state2->str_var[STR_ZHLC] = NULL;
+ for (i = 0; i < STR_NUM; ++i) {
+ kfree(at_state2->str_var[i]);
+ at_state2->str_var[i] = NULL;
+ }
at_state2->int_var[VAR_ZCTP] = -1;
spin_lock_irqsave(&cs->lock, flags);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-15 14:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-15 14:48 [2/3] gigaset: correct clearing of at_state strings on RING Karsten Keil
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.