From: Patrick Steinhardt Date: Tue, 24 Mar 2026 07:39:17 GMT Subject: Re: [PATCH 1/5] pack-objects: plug leak in `read_stdin_packs()` Message-ID: In-Reply-To: <1dac74f1e4a370097117754a6b1fbb6fa2b382a6.1773959041.git.me@ttaylorr.com> On Thu, Mar 19, 2026 at 06:24:15PM -0400, Taylor Blau wrote: > The `read_stdin_packs()` function added originally via 339bce27f4f > (builtin/pack-objects.c: add '--stdin-packs' option, 2021-02-22) > declares a `rev_info` struct but neglects to call `release_revisions()` > on it before returning, creating a leak. > > The related change in 97ec43247c0 (pack-objects: declare 'rev_info' for > '--stdin-packs' earlier, 2025-06-23) carried forward this oversight and > did not address it. > > Ensure that we call `release_revisions()` appropriately to prevent a > leak from this function. Would be curious to learn why none of our tests fail with this. The fix looks obviously correct though, and there are no other early exits that might need fixing here. Patrick