config: Only dereference value on success

This commit is contained in:
Vicent Marti 2012-10-25 19:22:35 +02:00
parent 67dad09bdb
commit 505f37b41a

View File

@ -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;