Commit 0b682649 by Rudolf

malloc->calloc

parent 02904743
Showing with 1 additions and 1 deletions
......@@ -48,7 +48,7 @@ struct tree *create_tree(FILE *file)
freq[c]++;
}
struct tree **forest = malloc((charcount) * sizeof(struct tree));
struct tree **forest = calloc(charcount, sizeof(struct tree));
/* Create empty forest - whoah */
int ntrees = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment