Skip to content

Commit 1f813cf

Browse files
author
Edward Thomson
committed
checkout::tree test: cleanup memory leak
1 parent 7f66a70 commit 1f813cf

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/checkout/tree.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ void test_checkout_tree__pathlist_checkout_ignores_non_matches(void)
441441
cl_assert(git_path_exists("testrepo/link_to_new.txt"));
442442
cl_assert(git_path_exists("testrepo/new.txt"));
443443

444+
git_object_free(g_object);
444445
cl_git_pass(git_revparse_single(&g_object, g_repo, "8496071c1b46c854b31185ea97743be6a8774479"));
445446

446447
g_opts.checkout_strategy =
@@ -454,10 +455,6 @@ void test_checkout_tree__pathlist_checkout_ignores_non_matches(void)
454455
cl_assert(!git_path_exists("testrepo/branch_file.txt"));
455456
cl_assert(!git_path_exists("testrepo/link_to_new.txt"));
456457
cl_assert(git_path_exists("testrepo/new.txt"));
457-
458-
git_object_free(g_object);
459-
g_object = NULL;
460-
461458
}
462459

463460
void test_checkout_tree__can_disable_pattern_match(void)

0 commit comments

Comments
 (0)