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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog: zap redundant free in diff error path
To:
Mark Jamsek <mark@jamsek.com>
Cc:
gameoftrees@openbsd.org
Date:
Thu, 15 Aug 2024 16:12:02 +0200

Download raw body.

Thread
On Fri, Aug 16, 2024 at 12:01:53AM +1000, Mark Jamsek wrote:
> I noticed this while expanding diffstat to arbitrary commits.
> 
> The lines pointer is always s->lines, which is freed in error paths via
> close_diff_view().
> 
> This applies on the previous diffstat diff but might apply without it.
> 

Yes, ok. This function has no business freeing the argument which
was passed in.