Fix segfault when calling git_config_get_* functions when a config fails to load

Reinitialize the result code of get_entry() to GIT_ENOTFOUND
This commit is contained in:
Linquize 2014-01-18 22:58:31 +08:00
parent f3a302ad8e
commit c24130e068

View File

@ -651,6 +651,7 @@ static int get_entry(
key = normalized; key = normalized;
} }
res = GIT_ENOTFOUND;
git_vector_foreach(&cfg->files, i, internal) { git_vector_foreach(&cfg->files, i, internal) {
if (!internal || !internal->file) if (!internal || !internal->file)
continue; continue;