summaryrefslogtreecommitdiff
path: root/tests/t15-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/t15-config.c')
-rw-r--r--tests/t15-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/t15-config.c b/tests/t15-config.c
index b959cc95a..ac2d79cfd 100644
--- a/tests/t15-config.c
+++ b/tests/t15-config.c
@@ -235,7 +235,7 @@ BEGIN_TEST(config10, "a repo's config overrides the global config")
int version;
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", CONFIG_BASE, 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));
@@ -255,7 +255,7 @@ BEGIN_TEST(config11, "fall back to the global config")
int num;
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", CONFIG_BASE, 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));