From: Jeff King Date: Thu, 15 Feb 2024 05:32:05 GMT Subject: Re: [PATCH] refs/reftable: fix leak when copying reflog fails Message-ID: <20240215053205.GE2821179@coredump.intra.peff.net> In-Reply-To: <02f7a97a451927f9a7ee06f3c5ea5af4c4eb6645.1707369907.git.ps@pks.im> On Thu, Feb 08, 2024 at 06:26:14AM +0100, Patrick Steinhardt wrote: > When copying a ref with the reftable backend we also copy the > corresponding log records. When seeking the first log record that we're > about to copy fails though we directly return from `write_copy_table()` > without doing any cleanup, leaking several allocated data structures. > > Fix this by exiting via our common cleanup logic instead. Thanks, this looks obviously correct to me. :) -Peff