gigaset: correct clearing of at_state strings on RING
authorTilman Schmidt <[email protected]>
Sun, 14 Mar 2010 12:58:05 +0000 (12:58 +0000)
committerDavid S. Miller <[email protected]>
Mon, 15 Mar 2010 23:00:49 +0000 (16:00 -0700)
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 <[email protected]>
Acked-by: Karsten Keil <[email protected]>
CC: [email protected]
Signed-off-by: David S. Miller <[email protected]>
drivers/isdn/gigaset/ev-layer.c

index c8f89b78b233525267a7cfba0d34ced7a7595a1e..206c380c52358c724aa72a06ce6c7405d9ff7164 100644 (file)
@@ -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);