aboutsummaryrefslogtreecommitdiffstats
path: root/t/t5409-colorize-remote-messages.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-22 11:17:49 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-22 09:18:05 -0700
commit2a2d5da1f22f91242c482bd7800b3dd03915870a (patch)
tree2ee74c561c3e5b96f644324b153c036176f4c811 /t/t5409-colorize-remote-messages.sh
parentbuiltin/send-pack: fix leaking refspecs (diff)
downloadgit-2a2d5da1f22f91242c482bd7800b3dd03915870a.tar.gz
git-2a2d5da1f22f91242c482bd7800b3dd03915870a.zip
sideband: fix leaks when configuring sideband colors
We read a bunch of configs in `use_sideband_colors()` to configure the colors that Git should use. We never free the strings read from the config though, causing memory leaks. Refactor the code to use `git_config_get_string_tmp()` instead, which does not allocate memory. As we throw the strings away after parsing them anyway there is no need to use allocated strings. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5409-colorize-remote-messages.sh')
-rwxr-xr-xt/t5409-colorize-remote-messages.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t5409-colorize-remote-messages.sh b/t/t5409-colorize-remote-messages.sh
index fa5de4500a..516b22fd96 100755
--- a/t/t5409-colorize-remote-messages.sh
+++ b/t/t5409-colorize-remote-messages.sh
@@ -2,6 +2,7 @@
test_description='remote messages are colorized on the client'
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'setup' '