mbox series

[v2,0/1] maintenance: fix two memory leaks

Message ID 20210510195909.621534-1-lenaic@lhuard.fr (mailing list archive)
Headers show
Series maintenance: fix two memory leaks | expand

Message

Lénaïc Huard May 10, 2021, 7:59 p.m. UTC
Hi!

Thank you for the code review.

I’ve moved the `strbuf_release(&line);` closer to the last point where
`line` is used.

And I’ve included Junio’s patch to address the missing
`free(local_path)` when `hold_lock_file_for_update()<0`.

Lénaïc Huard (1):
  maintenance: fix two memory leaks

 builtin/gc.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Comments

Junio C Hamano May 11, 2021, 3:29 a.m. UTC | #1
Lénaïc Huard <lenaic@lhuard.fr> writes:

> Hi!
>
> Thank you for the code review.
>
> I’ve moved the `strbuf_release(&line);` closer to the last point where
> `line` is used.
>
> And I’ve included Junio’s patch to address the missing
> `free(local_path)` when `hold_lock_file_for_update()<0`.
>
> Lénaïc Huard (1):
>   maintenance: fix two memory leaks
>
>  builtin/gc.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

Thanks, will queue.