From 505f37b41a7d80c539a33d28aec947cd87bb1b6c Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Thu, 25 Oct 2012 19:22:35 +0200 Subject: [PATCH] config: Only dereference value on success --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index f9bd205af..c85695f19 100644 --- a/src/config.c +++ b/src/config.c @@ -400,7 +400,7 @@ static int get_string_at_file(const char **out, git_config_file *file, const cha *out = NULL; res = file->get(file, name, &entry); - if (res != GIT_ENOTFOUND) + if (!res) *out = entry->value; return res;