Merge branch 'ps/leakfixes-part-6'

More leakfixes.

* ps/leakfixes-part-6: (22 commits)
  builtin/repack: fix leaking keep-pack list
  merge-ort: fix two leaks when handling directory rename modifications
  match-trees: fix leaking prefixes in `shift_tree()`
  builtin/fmt-merge-msg: fix leaking buffers
  builtin/grep: fix leaking object context
  builtin/pack-objects: plug leaking list of keep-packs
  builtin/repack: fix leaking line buffer when packing promisors
  negotiator/skipping: fix leaking commit entries
  shallow: fix leaking members of `struct shallow_info`
  shallow: free grafts when unregistering them
  object: clear grafts when clearing parsed object pool
  gpg-interface: fix misdesigned signing key interfaces
  send-pack: fix leaking push cert nonce
  remote: fix leak in reachability check of a remote-tracking ref
  remote: fix leaking tracking refs
  builtin/submodule--helper: fix leaking refs on push-check
  submodule: fix leaking fetch task data
  upload-pack: fix leaking child process data on reachability checks
  builtin/push: fix leaking refspec query result
  send-pack: fix leaking common object IDs
  ...
This commit is contained in:
Junio C Hamano
2024-09-20 11:16:30 -07:00
42 changed files with 178 additions and 72 deletions

View File

@ -1558,8 +1558,16 @@ then
passes_sanitize_leak=t
fi
if test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check"
if test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check" ||
test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check-failing"
then
if test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check-failing" &&
test -n "$passes_sanitize_leak"
then
skip_all="skipping leak-free $this_test under GIT_TEST_PASSING_SANITIZE_LEAK=check-failing"
test_done
fi
sanitize_leak_check=t
if test -n "$invert_exit_code"
then
@ -1597,6 +1605,7 @@ then
export LSAN_OPTIONS
elif test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check" ||
test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check-failing" ||
test_bool_env GIT_TEST_PASSING_SANITIZE_LEAK false
then
BAIL_OUT_ENV_NEEDS_SANITIZE_LEAK "GIT_TEST_PASSING_SANITIZE_LEAK=true"