Commit 69903777862bfdb03855ec13b0b63d65e0ed5410

Vicent Martí 2013-02-26T09:29:27

Merge pull request #1368 from scunz/inc_ref Increment reference counter in git_repository_set_config

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/repository.c b/src/repository.c
index 014b40a..c28a088 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -553,6 +553,7 @@ void git_repository_set_config(git_repository *repo, git_config *config)
 
 	repo->_config = config;
 	GIT_REFCOUNT_OWN(repo->_config, repo);
+	GIT_REFCOUNT_INC(repo->_config);
 }
 
 int git_repository_odb__weakptr(git_odb **out, git_repository *repo)