diff options
Diffstat (limited to 'tests-clar/commit')
-rw-r--r-- | tests-clar/commit/commit.c | 2 | ||||
-rw-r--r-- | tests-clar/commit/parent.c | 3 | ||||
-rw-r--r-- | tests-clar/commit/write.c | 16 |
3 files changed, 16 insertions, 5 deletions
diff --git a/tests-clar/commit/commit.c b/tests-clar/commit/commit.c index 1205e5285..4cedcea1d 100644 --- a/tests-clar/commit/commit.c +++ b/tests-clar/commit/commit.c @@ -11,6 +11,8 @@ void test_commit_commit__initialize(void) void test_commit_commit__cleanup(void) { git_repository_free(_repo); + _repo = NULL; + cl_fixture_cleanup("testrepo.git"); } diff --git a/tests-clar/commit/parent.c b/tests-clar/commit/parent.c index a00757732..18ce0bba6 100644 --- a/tests-clar/commit/parent.c +++ b/tests-clar/commit/parent.c @@ -16,7 +16,10 @@ void test_commit_parent__initialize(void) void test_commit_parent__cleanup(void) { git_commit_free(commit); + commit = NULL; + git_repository_free(_repo); + _repo = NULL; } static void assert_nth_gen_parent(unsigned int gen, const char *expected_oid) diff --git a/tests-clar/commit/write.c b/tests-clar/commit/write.c index 9c4d077a6..6d628096e 100644 --- a/tests-clar/commit/write.c +++ b/tests-clar/commit/write.c @@ -17,16 +17,22 @@ void test_commit_write__initialize(void) { g_repo = cl_git_sandbox_init("testrepo"); } + void test_commit_write__cleanup(void) { - git_reference_free(head); - git_reference_free(branch); + git_reference_free(head); + head = NULL; + + git_reference_free(branch); + branch = NULL; - git_commit_free(commit); + git_commit_free(commit); + commit = NULL; - git__free(head_old); + git__free(head_old); + head_old = NULL; - cl_git_sandbox_cleanup(); + cl_git_sandbox_cleanup(); } |