mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 07:42:07 +00:00
gigaset: correct clearing of at_state strings on RING
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> CC: stable@kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
bc35b4e347
commit
3a0a3a6b92
@ -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
|
* note that bcs may be NULL if no B channel is free
|
||||||
*/
|
*/
|
||||||
at_state2->ConState = 700;
|
at_state2->ConState = 700;
|
||||||
kfree(at_state2->str_var[STR_NMBR]);
|
for (i = 0; i < STR_NUM; ++i) {
|
||||||
at_state2->str_var[STR_NMBR] = NULL;
|
kfree(at_state2->str_var[i]);
|
||||||
kfree(at_state2->str_var[STR_ZCPN]);
|
at_state2->str_var[i] = NULL;
|
||||||
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;
|
|
||||||
at_state2->int_var[VAR_ZCTP] = -1;
|
at_state2->int_var[VAR_ZCTP] = -1;
|
||||||
|
|
||||||
spin_lock_irqsave(&cs->lock, flags);
|
spin_lock_irqsave(&cs->lock, flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user