git/refs
Patrick Steinhardt 8a0bebdeae 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>
2024-02-07 21:30:43 -08:00
..
debug.c refs: prepare refs_init_db() for initializing worktree refs 2024-01-08 13:17:30 -08:00
files-backend.c Merge branch 'ps/worktree-refdb-initialization' 2024-01-26 08:54:46 -08:00
iterator.c treewide: remove unnecessary cache.h inclusion from several sources 2023-03-21 10:56:51 -07:00
packed-backend.c Merge branch 'ps/worktree-refdb-initialization' 2024-01-26 08:54:46 -08:00
packed-backend.h Revert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'" 2022-04-13 15:51:33 -07:00
ref-cache.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
ref-cache.h hash-ll.h: split out of hash.h to remove dependency on repository.h 2023-04-24 12:47:32 -07:00
refs-internal.h refs: introduce reftable backend 2024-02-07 08:28:37 -08:00
reftable-backend.c refs/reftable: fix leak when copying reflog fails 2024-02-07 21:30:43 -08:00