Skip to content

Commit

Permalink
commit-reach: fix memory leak in get_reachable_subset()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
glandium authored and gitster committed Jun 4, 2023
1 parent 0d1bd1d commit 68b5117
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions commit-reach.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,8 @@ struct commit_list *get_reachable_subset(struct commit **from, int nr_from,
}
}

clear_prio_queue(&queue);

clear_commit_marks_many(nr_to, to, PARENT1);
clear_commit_marks_many(nr_from, from, PARENT2);

Expand Down

0 comments on commit 68b5117

Please sign in to comment.