{"thread":{"id":"59632","subject":"[PATCH] Fix memory leak in get_reachable_subset","startedAt":"2023-04-22T00:27:54Z","lastAt":"2023-04-24T20:42:25Z","messageCount":4,"participants":["Mike Hommey","Derrick Stolee","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"475826","messageId":"20230421234409.1925489-1-mh@glandium.org","threadId":"59632","inReplyTo":null,"subject":"[PATCH] Fix memory leak in get_reachable_subset","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2023-04-21T23:44:09Z","receivedAt":"2023-04-22T00:27:54Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"---\n commit-reach.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/commit-reach.c b/commit-reach.c\nindex 70bde8af05..f15d84566b 100644\n--- a/commit-reach.c\n+++ b/commit-reach.c\n@@ -944,6 +944,8 @@ struct commit_list *get_reachable_subset(struct commit **from, int nr_from,\n \t\t}\n \t}\n \n+\tclear_prio_queue(&queue);\n+\n \tclear_commit_marks_many(nr_to, to, PARENT1);\n \tclear_commit_marks_many(nr_from, from, PARENT2);\n \n-- \n2.39.0.1.g6739ec1790\n\n"},{"id":"475924","messageId":"d2825134-61db-9da4-450c-f027117b3d48@github.com","threadId":"59632","inReplyTo":"20230421234409.1925489-1-mh@glandium.org","subject":"Re: [PATCH] Fix memory leak in get_reachable_subset","fromName":"Derrick Stolee","fromEmail":"derrickstolee@github.com","sentAt":"2023-04-24T15:21:56Z","receivedAt":"2023-04-24T15:22:02Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 4/21/2023 7:44 PM, Mike Hommey wrote:\n> @@ -944,6 +944,8 @@ struct commit_list *get_reachable_subset(struct commit **from, int nr_from,\n>  \t\t}\n>  \t}\n>  \n> +\tclear_prio_queue(&queue);\n> +\n\nThanks. This is a leak that has existed since the method was first\ncreated in fcb2c0769db (commit-reach: implement get_reachable_subset,\n2018-11-02). I appreciate the attention to detail.\n\n-Stolee\n"},{"id":"475929","messageId":"xmqqbkjdgt36.fsf@gitster.g","threadId":"59632","inReplyTo":"20230421234409.1925489-1-mh@glandium.org","subject":"Re: [PATCH] Fix memory leak in get_reachable_subset","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-04-24T16:09:33Z","receivedAt":"2023-04-24T16:09:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mike Hommey <mh@glandium.org> writes:\n\n> ---\n>  commit-reach.c | 2 ++\n>  1 file changed, 2 insertions(+)\n\nMissing sign-off?\n\n[jc: adding the author of fcb2c076 (commit-reach: implement\nget_reachable_subset, 2018-11-02) to the CC list]\n\n> diff --git a/commit-reach.c b/commit-reach.c\n> index 70bde8af05..f15d84566b 100644\n> --- a/commit-reach.c\n> +++ b/commit-reach.c\n> @@ -944,6 +944,8 @@ struct commit_list *get_reachable_subset(struct commit **from, int nr_from,\n>  \t\t}\n>  \t}\n>  \n> +\tclear_prio_queue(&queue);\n> +\n>  \tclear_commit_marks_many(nr_to, to, PARENT1);\n>  \tclear_commit_marks_many(nr_from, from, PARENT2);\n\nLooking good.\n"},{"id":"475972","messageId":"20230424204114.53di55n22c5zpbyb@glandium.org","threadId":"59632","inReplyTo":"xmqqbkjdgt36.fsf@gitster.g","subject":"Re: [PATCH] Fix memory leak in get_reachable_subset","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2023-04-24T20:41:14Z","receivedAt":"2023-04-24T20:42:25Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Mon, Apr 24, 2023 at 09:09:33AM -0700, Junio C Hamano wrote:\n> Mike Hommey <mh@glandium.org> writes:\n> \n> > ---\n> >  commit-reach.c | 2 ++\n> >  1 file changed, 2 insertions(+)\n> \n> Missing sign-off?\n\nGah. Sorry, I forgot it in this and another patch I sent a few days\nago ([PATCH] Handle compiler versions containing a dash)\n\nDo you want full resends or is it okay if I just add\n\n  Signed-off-by: Mike Hommey <mh@glandium.org>\n\nhere?\n\nMike\n"}]}