diff --git a/dicepwgen.c b/dicepwgen.c index a194f83..f442e4e 100644 --- a/dicepwgen.c +++ b/dicepwgen.c @@ -175,11 +175,9 @@ void getwords(char *dictfile, int count) { free(tossed); - for (i = 0; i < 66667; i++) { - if (verbose > 0) { - fprintf(stdout, "freeing word[%d]\n", i); - } + for (i = 0; i < 66667; i++) if (words[i] != NULL) free(words[i]); - } + + free(words); } diff --git a/dictfile.c b/dictfile.c index eb572f0..782e49b 100644 --- a/dictfile.c +++ b/dictfile.c @@ -96,7 +96,7 @@ char **fetch_dict(char *dictfile) { pos = 11111; next = 0; - for (i = 0; i < 6666; i++) + for (i = 0; i < 66667; i++) words[i] = NULL; LOOP: