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

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: plug memleaks in got-fetch-pack and got-send-pack
To:
gameoftrees@openbsd.org
Date:
Thu, 7 Oct 2021 15:49:26 +0200

Download raw body.

Thread
Stefan Sperling:

> The id_str and refname results of got_gitproto_parse_refline()
> were allocated with strdup(3) and must be freed during every
> iteration of the loop which parses reflines, not just when the
> current function exits.
-snip-

That looks correct, but a bit cumbersome.
How about free()ing them at the head of the loop, maybe right before
the got_gitproto_parse_refline() call?

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de