From c24130e06896e9838a05301079bdb8f09912e546 Mon Sep 17 00:00:00 2001 From: Linquize Date: Sat, 18 Jan 2014 22:58:31 +0800 Subject: [PATCH] Fix segfault when calling git_config_get_* functions when a config fails to load Reinitialize the result code of get_entry() to GIT_ENOTFOUND --- src/config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.c b/src/config.c index 056a6ae13..6dcaba5fd 100644 --- a/src/config.c +++ b/src/config.c @@ -651,6 +651,7 @@ static int get_entry( key = normalized; } + res = GIT_ENOTFOUND; git_vector_foreach(&cfg->files, i, internal) { if (!internal || !internal->file) continue;