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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: Diff memory leak
To:
Omar Polo <op@omarpolo.com>
Cc:
Kyle Ackerman <kackerman0102@gmail.com>, gameoftrees@openbsd.org
Date:
Fri, 31 May 2024 12:44:09 +0200

Download raw body.

Thread
On Fri, May 31, 2024 at 12:05:34PM +0200, Omar Polo wrote:
> I'm not able to reproduce these, all I see playing with `got diff' are
> "leaks" from setlocale() and a missing free(cwd) (also in other cmds).

ok for this diff, thanks!

> diff /home/op/w/got
> commit - c2f5b3e63df878c687928a616ef24e87131a795e
> path + /home/op/w/got
> blob - b32ea7c37a6e4abe3ed85220602e1e8e24af6dc0
> file + got/got.c
> --- got/got.c
> +++ got/got.c
> @@ -5629,6 +5629,7 @@ cmd_diff(int argc, char *argv[])
>  	error = printfile(outfile);
>  
>  done:
> +	free(cwd);
>  	free(labels[0]);
>  	free(labels[1]);
>  	free(ids[0]);
> @@ -13794,6 +13795,7 @@ cmd_merge(int argc, char *argv[])
>  
>  	}
>  done:
> +	free(cwd);
>  	free(gitconfig_path);
>  	free(id_str);
>  	free(merge_commit_id);
> @@ -14447,6 +14449,7 @@ cmd_cat(int argc, char *argv[])
>  		id = NULL;
>  	}
>  done:
> +	free(cwd);
>  	free(label);
>  	free(id);
>  	free(commit_id);
> 
>