summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-09-17 03:19:40 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-09-17 03:19:40 +0200
commit25abbc27a77895e2f2316ed307b51e628d85f15c (patch)
tree1fc915d958e07ce2cd8b523deb53c0c626c55f66 /tests
parentecef28d55c7d72dda0e33649614f2b20db482cd6 (diff)
downloadlibgit2-25abbc27a77895e2f2316ed307b51e628d85f15c.tar.gz
Clean up some leaks in the test suite
Diffstat (limited to 'tests')
-rw-r--r--tests/network/remote/remotes.c1
-rw-r--r--tests/repo/init.c1
-rw-r--r--tests/transport/register.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/tests/network/remote/remotes.c b/tests/network/remote/remotes.c
index d176774ea..df424e961 100644
--- a/tests/network/remote/remotes.c
+++ b/tests/network/remote/remotes.c
@@ -547,6 +547,7 @@ void test_network_remote_remotes__single_branch(void)
}
cl_assert_equal_i(1, count);
+ git_strarray_free(&refs);
git_repository_free(repo);
}
diff --git a/tests/repo/init.c b/tests/repo/init.c
index 999afd625..189b0894a 100644
--- a/tests/repo/init.c
+++ b/tests/repo/init.c
@@ -423,6 +423,7 @@ void test_repo_init__relative_gitdir_2(void)
/* make the directory first, then it should succeed */
cl_git_pass(git_repository_init_ext(&_repo, "root/b/my_repository", &opts));
+ git_buf_free(&full_path);
cl_assert(!git__suffixcmp(git_repository_workdir(_repo), "root/b/c_wd/"));
cl_assert(!git__suffixcmp(git_repository_path(_repo), "root/b/my_repository/"));
diff --git a/tests/transport/register.c b/tests/transport/register.c
index 937194c1c..ea917d5d3 100644
--- a/tests/transport/register.c
+++ b/tests/transport/register.c
@@ -47,6 +47,7 @@ void test_transport_register__custom_transport_ssh(void)
cl_git_fail_with(git_transport_new(&transport, NULL, "git@somehost:somepath"), -1);
#else
cl_git_pass(git_transport_new(&transport, NULL, "git@somehost:somepath"));
+ transport->free(transport);
#endif
cl_git_pass(git_transport_register("ssh", dummy_transport, NULL));
@@ -62,5 +63,6 @@ void test_transport_register__custom_transport_ssh(void)
cl_git_fail_with(git_transport_new(&transport, NULL, "git@somehost:somepath"), -1);
#else
cl_git_pass(git_transport_new(&transport, NULL, "git@somehost:somepath"));
+ transport->free(transport);
#endif
}