Re: [PATCH v2 07/21] bisect: plug the biggest memory leak
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 15, 2016, 21:18 UTC
- Message-ID
- <xmqqh9f2a7vb.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1460294354-7031-8-git-send-email-s-beyer@gmx.net>
Stephan Beyer <s-beyer@gmx.net> writes:
Show 18 quoted lines
> Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
> ---
> bisect.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/bisect.c b/bisect.c
> index 7996c29..901e4d3 100644
> --- a/bisect.c
> +++ b/bisect.c
> @@ -984,6 +984,8 @@ int bisect_next_all(const char *prefix, int no_checkout)
> exit(10);
> }
>
> + free_commit_list(revs.commits);
> +
> nr = all - reaches - 1;
> steps = estimate_bisect_steps(all);
> printf("Bisecting: %d revision%s left to test after this "While I do not think this is wrong per-se (i.e. it is clear that we no longer need revs.commits), after this the function will return to the top-level caller and exit immediately, and I do not see anything that desperately wants to use as much memory as available (i.e. would be helped by this piece of memory released early). "the biggest" may be an overstatement ;-)