Commit 49621a34af7160d4afbf08a5be15e0e4f3a47791

Russell Belfer 2013-06-27T15:46:46

Fix memory leak in test

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/tests-clar/diff/submodules.c b/tests-clar/diff/submodules.c
index e3c4e66..ffaae3c 100644
--- a/tests-clar/diff/submodules.c
+++ b/tests-clar/diff/submodules.c
@@ -163,6 +163,7 @@ void test_diff_submodules__dirty_submodule_2(void)
 		cl_git_pass(git_diff_tree_to_index(&diff2, g_repo, head, NULL, &opts));
 		cl_git_pass(git_diff_merge(diff, diff2));
 		git_diff_list_free(diff2);
+		git_tree_free(head);
 
 		check_diff_patches(diff, expected_dirty);
 	}