From 1f813cf2b8c9b1976cec15014dec8edd854f8e88 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Mon, 23 Jan 2017 17:32:13 -0600 Subject: [PATCH] checkout::tree test: cleanup memory leak --- tests/checkout/tree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/checkout/tree.c b/tests/checkout/tree.c index c9581fdc5..b3b860c63 100644 --- a/tests/checkout/tree.c +++ b/tests/checkout/tree.c @@ -441,6 +441,7 @@ void test_checkout_tree__pathlist_checkout_ignores_non_matches(void) cl_assert(git_path_exists("testrepo/link_to_new.txt")); cl_assert(git_path_exists("testrepo/new.txt")); + git_object_free(g_object); cl_git_pass(git_revparse_single(&g_object, g_repo, "8496071c1b46c854b31185ea97743be6a8774479")); g_opts.checkout_strategy = @@ -454,10 +455,6 @@ void test_checkout_tree__pathlist_checkout_ignores_non_matches(void) cl_assert(!git_path_exists("testrepo/branch_file.txt")); cl_assert(!git_path_exists("testrepo/link_to_new.txt")); cl_assert(git_path_exists("testrepo/new.txt")); - - git_object_free(g_object); - g_object = NULL; - } void test_checkout_tree__can_disable_pattern_match(void) -- 2.39.5