Commit 94d24ac9 by Ben Straub

Merge pull request #1573 from nulltoken/fix/leaks

Fix some memory leaks
parents ae59321f 24988894
...@@ -185,6 +185,7 @@ void test_clone_nonetwork__custom_autotag(void) ...@@ -185,6 +185,7 @@ void test_clone_nonetwork__custom_autotag(void)
cl_assert_equal_i(GIT_REMOTE_DOWNLOAD_TAGS_NONE, origin->download_tags); cl_assert_equal_i(GIT_REMOTE_DOWNLOAD_TAGS_NONE, origin->download_tags);
git_strarray_free(&tags); git_strarray_free(&tags);
git_remote_free(origin);
} }
void test_clone_nonetwork__custom_autotag_tags_all(void) void test_clone_nonetwork__custom_autotag_tags_all(void)
...@@ -199,6 +200,7 @@ void test_clone_nonetwork__custom_autotag_tags_all(void) ...@@ -199,6 +200,7 @@ void test_clone_nonetwork__custom_autotag_tags_all(void)
cl_assert_equal_i(GIT_REMOTE_DOWNLOAD_TAGS_ALL, origin->download_tags); cl_assert_equal_i(GIT_REMOTE_DOWNLOAD_TAGS_ALL, origin->download_tags);
git_strarray_free(&tags); git_strarray_free(&tags);
git_remote_free(origin);
} }
void test_clone_nonetwork__cope_with_already_existing_directory(void) void test_clone_nonetwork__cope_with_already_existing_directory(void)
......
...@@ -113,11 +113,12 @@ void test_refs_branches_upstream__set_unset_upstream(void) ...@@ -113,11 +113,12 @@ void test_refs_branches_upstream__set_unset_upstream(void)
cl_git_pass(git_config_get_string(&value, config, "branch.test.merge")); cl_git_pass(git_config_get_string(&value, config, "branch.test.merge"));
cl_assert_equal_s(value, "refs/heads/master"); cl_assert_equal_s(value, "refs/heads/master");
git_reference_free(branch);
/* local */ /* local */
cl_git_pass(git_reference_lookup(&branch, repository, "refs/heads/test")); cl_git_pass(git_reference_lookup(&branch, repository, "refs/heads/test"));
cl_git_pass(git_branch_set_upstream(branch, "master")); cl_git_pass(git_branch_set_upstream(branch, "master"));
cl_git_pass(git_repository_config(&config, repository));
cl_git_pass(git_config_get_string(&value, config, "branch.test.remote")); cl_git_pass(git_config_get_string(&value, config, "branch.test.remote"));
cl_assert_equal_s(value, "."); cl_assert_equal_s(value, ".");
cl_git_pass(git_config_get_string(&value, config, "branch.test.merge")); cl_git_pass(git_config_get_string(&value, config, "branch.test.merge"));
......
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