]> git.proxmox.com Git - libgit2.git/commitdiff
tests: plug a leak in the repo tests
authorCarlos Martín Nieto <carlos@cmartin.tk>
Thu, 21 Jun 2012 00:30:30 +0000 (02:30 +0200)
committerCarlos Martín Nieto <carlos@cmartin.tk>
Thu, 21 Jun 2012 00:30:30 +0000 (02:30 +0200)
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.

tests-clar/repo/init.c

index 2e70c511e79edb20eef47ba1a43176e2393c2c52..1ba355ed65d224ad384f4214eef434e928ca579b 100644 (file)
@@ -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);
 }