Commit 9311423c by Carlos Martín Nieto

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.
parent b3aa4406
...@@ -245,5 +245,6 @@ void test_repo_init__reinit_doesnot_overwrite_ignorecase(void) ...@@ -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) void test_repo_init__sets_logAllRefUpdates_according_to_type_of_repository(void)
{ {
assert_config_entry_on_init_bytype("core.logallrefupdates", GIT_ENOTFOUND, true); 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); assert_config_entry_on_init_bytype("core.logallrefupdates", true, false);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment