Re: [PATCH 08/34] connect: release strbuf on error return in git_connect()
- From
Stefan Beller <sbeller@google.com>
- Date
- Aug 31, 2017, 17:44 UTC
- Message-ID
- <CAGZ79kadsNTyChYScPEShqAm_TNuSfXS_N8xO3PccsgaDEF-bg@mail.gmail.com>
- In-Reply-To
- <20170830175005.20756-9-l.s.r@web.de>
> } else {
> + struct strbuf cmd = STRBUF_INIT;
> +...
> strbuf_addstr(&cmd, prog); > strbuf_addch(&cmd, ' '); > sq_quote_buf(&cmd, path);
...
> if (start_command(conn))
> die("unable to fork");...
> strbuf_release(&cmd);
Here I reread the cover letter, your intent is only to fix memleaks on non-die code paths. Ok. (unlike the grand vision of an "always valgrind clean program")
Thanks, Stefan