diff --git a/cmd-string.c b/cmd-string.c index 7af34fb0..1a380e50 100644 --- a/cmd-string.c +++ b/cmd-string.c @@ -151,10 +151,6 @@ cmd_string_parse(const char *s, struct cmd_list **cmdlist, char **cause) if (*cmdlist == NULL) goto out; - do - xfree(argv[argc - 1]); - while (--argc > 0); - rval = 0; goto out; case '~': @@ -189,7 +185,7 @@ out: if (argv != NULL) { for (i = 0; i < argc; i++) - xfree(argv[argc]); + xfree(argv[i]); xfree(argv); }