mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 15:00:04 +00:00
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:
parent
f3a302ad8e
commit
c24130e068
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user