initialize optional output parameters in parse_gitconfig_file()
diff --git a/lib/repository.c b/lib/repository.c
index 1c7c3d1..bd2ded9 100644
--- a/lib/repository.c
+++ b/lib/repository.c
@@ -375,6 +375,12 @@ parse_gitconfig_file(int *gitconfig_repository_format_version,
*gitconfig_repository_format_version = 0;
*gitconfig_author_name = NULL;
*gitconfig_author_email = NULL;
+ if (remotes)
+ *remotes = NULL;
+ if (nremotes)
+ *nremotes = 0;
+ if (gitconfig_owner)
+ *gitconfig_owner = NULL;
fd = open(gitconfig_path, O_RDONLY);
if (fd == -1) {