Re: Git Test Coverage Report (Thursday, Aug 15)
- From
Jeff King <peff@peff.net>
- Date
- Aug 16, 2019, 18:15 UTC
- Message-ID
- <20190816181515.GA15741@sigill.intra.peff.net>
- In-Reply-To
- <20190816181103.GA13894@sigill.intra.peff.net>
On Fri, Aug 16, 2019 at 02:11:03PM -0400, Jeff King wrote:
Show 15 quoted lines
> if (opts->ignore_whitespace) {
> struct strbuf buf = STRBUF_INIT;
>
> if (strategy_opts)
> strbuf_addstr(&buf, strategy_opts);
>
> strbuf_addstr(&buf, " --ignore-space-change");
> free(strategy_opts);
> strategy_opts = strbuf_detach(&buf, NULL);
> }
> [...]
> (As an aside, this code leaks the newly allocated buffer and leaves a
> dangling pointer in opts->strategy_opts, but that's all orthogonal to
> the uncovered line; I'll send a separate message to the original
> author).In case any of you were on the edge of your seat waiting for more discussion, it turns out that Phillip already noticed this problem during review:
https://public-inbox.org/git/a505fdf3-5926-9765-21ef-b82334a3fba4@gmail.com/
So nothing to see here. :)
-Peff