Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2013-05-10 14:02:17 +0400
committernulltoken <emeric.fermas@gmail.com>2013-05-10 21:22:47 +0400
commit249888948f73667695fcde8088249db2e1a217ba (patch)
tree6e9b2e8fb1e1a8bf3f071aa695aae03e39bdb6de /tests-clar
parentae59321fb86d080d0fd17e8c9a57c855914bcd32 (diff)
Fix some memory leaks
Diffstat (limited to 'tests-clar')
-rw-r--r--tests-clar/clone/nonetwork.c2
-rw-r--r--tests-clar/refs/branches/upstream.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/tests-clar/clone/nonetwork.c b/tests-clar/clone/nonetwork.c
index 8b17fd998..8aae1fb52 100644
--- a/tests-clar/clone/nonetwork.c
+++ b/tests-clar/clone/nonetwork.c
@@ -185,6 +185,7 @@ void test_clone_nonetwork__custom_autotag(void)
cl_assert_equal_i(GIT_REMOTE_DOWNLOAD_TAGS_NONE, origin->download_tags);
git_strarray_free(&tags);
+ git_remote_free(origin);
}
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);
git_strarray_free(&tags);
+ git_remote_free(origin);
}
void test_clone_nonetwork__cope_with_already_existing_directory(void)
diff --git a/tests-clar/refs/branches/upstream.c b/tests-clar/refs/branches/upstream.c
index 648acb44d..69e55a0c5 100644
--- a/tests-clar/refs/branches/upstream.c
+++ b/tests-clar/refs/branches/upstream.c
@@ -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_assert_equal_s(value, "refs/heads/master");
+ git_reference_free(branch);
+
/* local */
cl_git_pass(git_reference_lookup(&branch, repository, "refs/heads/test"));
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_assert_equal_s(value, ".");
cl_git_pass(git_config_get_string(&value, config, "branch.test.merge"));