From: Jeff King Date: Mon, 03 Jul 2023 05:16:25 GMT Subject: Re: [PATCH v4 03/16] ref-filter: clear reachable list pointers after freeing Message-ID: <20230703051625.GC3502534@coredump.intra.peff.net> In-Reply-To: <7e6bf7766d020914af53e7d6926f5a6c4c4d0668.1687270849.git.me@ttaylorr.com> On Tue, Jun 20, 2023 at 10:21:11AM -0400, Taylor Blau wrote: > From: Jeff King > > In reach_filter(), we pop all commits from the reachable lists, leaving > them empty. But because we're operating on a list pointer that was > passed by value, the original filter.reachable_from pointer is left > dangling. Yep. This isn't a bug (yet) because nobody looks at the now-dangling pointer. So as with the last patch, we're future-proofing ourselves against dangerous situations. -Peff