From: Jeff King <peff@peff.net>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] refs/reftable: fix leak when copying reflog fails
Date: Thu, 15 Feb 2024 00:32:05 -0500 [thread overview]
Message-ID: <20240215053205.GE2821179@coredump.intra.peff.net> (raw)
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
prev parent reply other threads:[~2024-02-15 5:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 5:26 [PATCH] refs/reftable: fix leak when copying reflog fails Patrick Steinhardt
2024-02-15 5:32 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240215053205.GE2821179@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox