summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2026-07-05 08:24:24 +0000
committerJunio C Hamano <gitster@pobox.com>2026-07-05 09:12:10 -0700
commitadd15d11ac1d882fe1a36e3f7a936fb92943ecca (patch)
treeba8740ae1dee88ed29945ea1d74c94c3737ff35e /t/t4013/diff.diff_initial..side
parent6eb60059bd6d852d41c5e5c43bf5b033abbfca3b (diff)
submodule: fix cwd leak in `get_superproject_working_tree()`
`get_superproject_working_tree()` allocates cwd via `xgetcwd()` at the top of the function, but two early-return paths (when not inside a work tree, and when strbuf_realpath for "../" fails) return 0 without freeing it. Redirect these early returns through a cleanup label that frees cwd before returning. Pointed out by Coverity. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions