summaryrefslogtreecommitdiff
path: root/tests-clar/repo/init.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-06-21 02:30:30 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-06-21 02:30:30 +0200
commit9311423c34bbd369928152c6a2b669204276ddd1 (patch)
tree1cdf34b6015c33f31d1ea6e45a3116fcde07e39a /tests-clar/repo/init.c
parentb3aa440641135619ff3890da03c65ba52396f42c (diff)
downloadlibgit2-9311423c34bbd369928152c6a2b669204276ddd1.tar.gz
tests: plug a leak in the repo tests
The second call to assert_config_entry_on_init_bytype is cleaned up by the main cleanup function, but that overwrites the first _repo. Make sure that one doesn't leak.
Diffstat (limited to 'tests-clar/repo/init.c')
-rw-r--r--tests-clar/repo/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests-clar/repo/init.c b/tests-clar/repo/init.c
index 2e70c511e..1ba355ed6 100644
--- a/tests-clar/repo/init.c
+++ b/tests-clar/repo/init.c
@@ -245,5 +245,6 @@ void test_repo_init__reinit_doesnot_overwrite_ignorecase(void)
void test_repo_init__sets_logAllRefUpdates_according_to_type_of_repository(void)
{
assert_config_entry_on_init_bytype("core.logallrefupdates", GIT_ENOTFOUND, true);
+ git_repository_free(_repo);
assert_config_entry_on_init_bytype("core.logallrefupdates", true, false);
}