]> git.tue.mpg.de Git - adu.git/commitdiff
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 69b0343b3ba5ded9eb5fd8041a9d64c312fd29c5..4e4ccc7417d0165581725c298ceb4bf6a06d1d30 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);
 }