"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: plug ref leak in got update
To:
Mark Jamsek <mark@jamsek.com>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 23 Jul 2023 12:38:22 +0200

Download raw body.

Thread
On 2023/07/23 20:09:57 +1000, Mark Jamsek <mark@jamsek.com> wrote:
> As per the subject, we leak head_ref in cmd_update()

ok

> -----------------------------------------------
> commit 02af858a6ee42bbbf72128ab9643d850e32bce51 (main)
> from: Mark Jamsek <mark@jamsek.dev>
> date: Sun Jul 23 10:02:35 2023 UTC
>  
>  plug got_referece leak in cmd_update()
>  
> diff 863cc633e270c0edf587982ac9faccf7bb28f339 02af858a6ee42bbbf72128ab9643d850e32bce51
> commit - 863cc633e270c0edf587982ac9faccf7bb28f339
> commit + 02af858a6ee42bbbf72128ab9643d850e32bce51
> blob - ff960485254894c4b8c41fda56a2319bc2b89b17
> blob + dae05a53000410c2bf66f6696b63f8af1312036e
> --- got/got.c
> +++ got/got.c
> @@ -3680,6 +3680,8 @@ done:
>  		if (error == NULL)
>  			error = close_err;
>  	}
> +	if (head_ref != NULL)
> +		got_ref_close(head_ref);
>  	free(worktree_path);
>  	got_pathlist_free(&paths, GOT_PATHLIST_FREE_PATH);
>  	free(commit_id);