Merge pull request #2059 from linquize/git_config_get_crash Fix segfault when calling git_config_get_* functions when a config fails to load
diff --git a/src/config.c b/src/config.c
index 8447608..fa1dd81 100644
--- a/src/config.c
+++ b/src/config.c
@@ -652,6 +652,7 @@ static int get_entry(
key = normalized;
}
+ res = GIT_ENOTFOUND;
git_vector_foreach(&cfg->files, i, internal) {
if (!internal || !internal->file)
continue;