diff options
author | Tilman Schmidt <tilman@imap.cc> | 2010-03-14 08:58:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-01 19:01:27 -0400 |
commit | cfbb7c7fb13394c0b501939f721ffa83c604f647 (patch) | |
tree | 352e09645bb22f019141c19d502862c27a25e5a3 | |
parent | 05b94852667ef2a3b82fb7befe341049644859c6 (diff) |
gigaset: correct clearing of at_state strings on RING
commit 3a0a3a6b92edf181f849ebd8417122392ba73a96 upstream.
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | 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 ddeb0456d202..0304d026be3e 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c | |||
@@ -1259,14 +1259,10 @@ static void do_action(int action, struct cardstate *cs, | |||
1259 | * note that bcs may be NULL if no B channel is free | 1259 | * note that bcs may be NULL if no B channel is free |
1260 | */ | 1260 | */ |
1261 | at_state2->ConState = 700; | 1261 | at_state2->ConState = 700; |
1262 | kfree(at_state2->str_var[STR_NMBR]); | 1262 | for (i = 0; i < STR_NUM; ++i) { |
1263 | at_state2->str_var[STR_NMBR] = NULL; | 1263 | kfree(at_state2->str_var[i]); |
1264 | kfree(at_state2->str_var[STR_ZCPN]); | 1264 | at_state2->str_var[i] = NULL; |
1265 | at_state2->str_var[STR_ZCPN] = NULL; | 1265 | } |
1266 | kfree(at_state2->str_var[STR_ZBC]); | ||
1267 | at_state2->str_var[STR_ZBC] = NULL; | ||
1268 | kfree(at_state2->str_var[STR_ZHLC]); | ||
1269 | at_state2->str_var[STR_ZHLC] = NULL; | ||
1270 | at_state2->int_var[VAR_ZCTP] = -1; | 1266 | at_state2->int_var[VAR_ZCTP] = -1; |
1271 | 1267 | ||
1272 | spin_lock_irqsave(&cs->lock, flags); | 1268 | spin_lock_irqsave(&cs->lock, flags); |