diff --git a/src/usher-sampled/driver/main.cpp b/src/usher-sampled/driver/main.cpp index 2556adaf..fa9c2153 100644 --- a/src/usher-sampled/driver/main.cpp +++ b/src/usher-sampled/driver/main.cpp @@ -310,6 +310,7 @@ static int leader_thread( break; } } + fclose(placement_stats_file); fprintf(stderr, "Main finised place\n"); auto dfs=tree.depth_first_expansion(); clean_up_leaf(dfs); diff --git a/src/usher-sampled/driver/socket.cpp b/src/usher-sampled/driver/socket.cpp index 2ea4b4e7..43b5fed7 100644 --- a/src/usher-sampled/driver/socket.cpp +++ b/src/usher-sampled/driver/socket.cpp @@ -426,6 +426,7 @@ static void child_proc(int fd, TreeCollectionPtr &trees_ptr) { low_confidence_samples, samples_clade, sample_start_idx, true, f); fputs("placing sample end\n", stderr); + fclose(placement_stats_file); auto dfs = tree.depth_first_expansion(); clean_up_leaf(dfs); final_output(tree, options.out_options, 0, samples_clade, sample_start_idx,