summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-02-08 06:26:14 +0100
committerJunio C Hamano <gitster@pobox.com>2024-02-07 21:30:43 -0800
commit8a0bebdeaec60623c8a791b197d574bdd031a452 (patch)
tree0fa18643b9709db8f32c1a7b9a2ec37aadea2565 /builtin/commit.c
parentc0350cb96465b152ce67ef381af058594713f99b (diff)
refs/reftable: fix leak when copying reflog fails
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. Reported-by: Jeff King <peff@peff.net> via Coverity Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions