Download raw body.
plug memory leak in got_ref_list_free()
On Thu, May 20, 2021 at 12:11:23PM +0200, Stefan Sperling wrote:
> Code which inserts a reference into a reflist passes ownership of
> this reference to the list. However, got_ref_list_free() never
> frees such references, which results in a memory leak.
>
> ok?
ok
>
> diff 9069347b693ed2803ca224d77823b2e4e2f2e4e5 /home/stsp/src/got
> blob - 4b530db4089bee13c3808f740ec124254aa41fca
> file + lib/reference.c
> --- lib/reference.c
> +++ lib/reference.c
> @@ -1060,6 +1060,7 @@ got_ref_list_free(struct got_reflist_head *refs)
>
> while ((re = TAILQ_FIRST(refs))) {
> TAILQ_REMOVE(refs, re, entry);
> + got_ref_close(re->ref);
> free(re);
> }
>
--
Tracey Emery
plug memory leak in got_ref_list_free()