diff options
Diffstat (limited to 'builtin/config.c')
-rw-r--r-- | builtin/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/config.c b/builtin/config.c index 99bc7ef64e..98d65bc0ad 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -599,7 +599,7 @@ int cmd_config(int argc, const char **argv, const char *prefix) int nongit = !startup_info->have_repository; char *value; - given_config_source.file = getenv(CONFIG_ENVIRONMENT); + given_config_source.file = xstrdup_or_null(getenv(CONFIG_ENVIRONMENT)); argc = parse_options(argc, argv, prefix, builtin_config_options, builtin_config_usage, |