Fix interactive reset command.
authorAndre Noll <maan@systemlinux.org>
Sun, 2 Nov 2008 15:41:31 +0000 (16:41 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 2 Nov 2008 15:41:31 +0000 (16:41 +0100)
We have to invalidate both the format info and the array of
admissible urls.

interactive.c

index 69b0343..4e4ccc7 100644 (file)
@@ -70,6 +70,10 @@ void print_interactive_help(void)
 
 static int icom_reset(__a_unused char *line)
 {
+       free_format_info(fi);
+       fi = NULL;
+       free(admissible_uids);
+       admissible_uids = NULL;
        select_cmdline_parser_init(&select_conf);
        return 1;
 }
@@ -90,6 +94,8 @@ static int icom_set(char *line)
 
        free_format_info(fi);
        fi = NULL;
+       free(admissible_uids);
+       admissible_uids = NULL;
        return parse_select_options(line, &params, &admissible_uids, &fi);
 }