diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2026-07-05 08:24:24 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-07-05 09:12:10 -0700 |
| commit | add15d11ac1d882fe1a36e3f7a936fb92943ecca (patch) | |
| tree | ba8740ae1dee88ed29945ea1d74c94c3737ff35e /t/t4013/diff.diff_initial..side | |
| parent | 6eb60059bd6d852d41c5e5c43bf5b033abbfca3b (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
