Skip to content

Commit

Permalink
Fix malloc
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromekelleher committed Jul 6, 2023
1 parent 6ba3df3 commit da0ea6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c/tskit/trees.c
Original file line number Diff line number Diff line change
Expand Up @@ -6407,7 +6407,7 @@ tsk_treeseq_divergence_matrix_site(const tsk_treeseq_t *self, tsk_size_t num_sam
tsk_id_t u, v;
double left, right, span_left, span_right;
double *restrict D;
tsk_size_t *mutations_per_node = malloc(num_nodes * sizeof(*mutations_per_node));
tsk_size_t *mutations_per_node = tsk_malloc(num_nodes * sizeof(*mutations_per_node));

ret = tsk_tree_init(&tree, self, 0);
if (ret != 0) {
Expand Down

0 comments on commit da0ea6e

Please sign in to comment.