Skip to content

Commit 68b5117

Browse files
glandiumgitster
authored andcommitted
commit-reach: fix memory leak in get_reachable_subset()
This is a leak that has existed since the method was first created in fcb2c07 (commit-reach: implement get_reachable_subset, 2018-11-02). Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 0d1bd1d commit 68b5117

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

commit-reach.c

+2
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,8 @@ struct commit_list *get_reachable_subset(struct commit **from, int nr_from,
936936
}
937937
}
938938

939+
clear_prio_queue(&queue);
940+
939941
clear_commit_marks_many(nr_to, to, PARENT1);
940942
clear_commit_marks_many(nr_from, from, PARENT2);
941943

0 commit comments

Comments
 (0)