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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: gotwebd: plug memleaks in got_get_repo_commits
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 2 Sep 2022 14:13:22 +0200

Download raw body.

Thread
On Fri, Sep 02, 2022 at 12:50:28PM +0200, Omar Polo wrote:
> second attemp at fixing this.  For my own mental sanity and for who
> will read this, I've split it into three separate commits to ease
> reviewing.  The first two should be evident, the third one is a bit
> more convoluted: it avoids calling two times got_get_repo_commit
> (singular!) and leaking at every iteration the contents of
> `repo_commit'.  Instead, drop the new_repo_commit var and only use
> repo_commit.  To ease tracking the lifetime of it, immediately push it
> into the tailq like got_get_repo_tags does.
> 
> ok?

Nice. ok stsp