aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.c4
-rwxr-xr-xt/t7300-clean.sh1
2 files changed, 4 insertions, 1 deletions
diff --git a/config.c b/config.c
index aa2888d301..146856567a 100644
--- a/config.c
+++ b/config.c
@@ -1690,8 +1690,10 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
if (!strcmp(var, "core.askpass"))
return git_config_string(&askpass_program, var, value);
- if (!strcmp(var, "core.excludesfile"))
+ if (!strcmp(var, "core.excludesfile")) {
+ free((char *)excludes_file);
return git_config_pathname(&excludes_file, var, value);
+ }
if (!strcmp(var, "core.whitespace")) {
if (!value)
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index c975eb54d2..529fc53339 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -5,6 +5,7 @@
test_description='git clean basic tests'
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
git config clean.requireForce no