mirror of
https://github.com/git/git
synced 2024-10-01 06:05:20 +00:00
Merge branch 'jc/unleak-core-excludesfile'
The variable that holds the value read from the core.excludefile configuration variable used to leak, which has been corrected. * jc/unleak-core-excludesfile: config: do not leak excludes_file
This commit is contained in:
commit
b415f15b49
4
config.c
4
config.c
|
@ -1584,8 +1584,10 @@ static int git_default_core_config(const char *var, const char *value,
|
||||||
if (!strcmp(var, "core.askpass"))
|
if (!strcmp(var, "core.askpass"))
|
||||||
return git_config_string(&askpass_program, var, value);
|
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);
|
return git_config_pathname(&excludes_file, var, value);
|
||||||
|
}
|
||||||
|
|
||||||
if (!strcmp(var, "core.whitespace")) {
|
if (!strcmp(var, "core.whitespace")) {
|
||||||
if (!value)
|
if (!value)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
test_description='git clean basic tests'
|
test_description='git clean basic tests'
|
||||||
|
|
||||||
|
TEST_PASSES_SANITIZE_LEAK=true
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
git config clean.requireForce no
|
git config clean.requireForce no
|
||||||
|
|
Loading…
Reference in a new issue