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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: plug leak in resolve_symlink
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 3 Sep 2022 17:21:35 +0200

Download raw body.

Thread
On Sat, Sep 03, 2022 at 04:48:47PM +0200, Omar Polo wrote:
> The path allocated by got_path_dirname is not released.  probably a
> leftover from a previous dirname(3) call?

ok

> diff /tmp/got
> commit - c284d624c415ca86a512de461f47d1bf12aa705b
> path + /tmp/got
> blob - 9fcd4fa3978b2e29657e3fb07c4d6af41f6427cd
> file + lib/object.c
> --- lib/object.c
> +++ lib/object.c
> @@ -2192,6 +2192,7 @@ resolve_symlink(char **link_target, const char *path,
>  		}
>  	}
>  done:
> +	free(parent_path);
>  	free(tree_obj_id);
>  	if (tree)
>  		got_object_tree_close(tree);
> 
>