tests: plug a couple of leaks
diff --git a/tests-clar/diff/workdir.c b/tests-clar/diff/workdir.c
index 5c89b95..21da639 100644
--- a/tests-clar/diff/workdir.c
+++ b/tests-clar/diff/workdir.c
@@ -897,6 +897,7 @@ void test_diff_workdir__can_diff_empty_file(void)
/* baseline - make sure there are no outstanding diffs */
cl_git_pass(git_diff_tree_to_workdir(&diff, g_repo, tree, &opts));
+ git_tree_free(tree);
cl_assert_equal_i(2, (int)git_diff_num_deltas(diff));
git_diff_list_free(diff);
diff --git a/tests-clar/network/cred.c b/tests-clar/network/cred.c
index 0fdcf3a..b7f45c2 100644
--- a/tests-clar/network/cred.c
+++ b/tests-clar/network/cred.c
@@ -23,5 +23,5 @@ void test_network_cred__stock_userpass_validates_that_method_is_allowed(void)
cl_git_fail(git_cred_userpass(&cred, NULL, 0, &payload));
cl_git_pass(git_cred_userpass(&cred, NULL, GIT_CREDTYPE_USERPASS_PLAINTEXT, &payload));
- git__free(cred);
+ cred->free(cred);
}