Commit 6a35e74cb3a2f6cb1640c2eec1c99665b40d4df7

Edward Thomson 2016-03-30T17:47:05

leaks: fix some leaks in the tests

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/tests/config/write.c b/tests/config/write.c
index e83cfb4..56ef2e9 100644
--- a/tests/config/write.c
+++ b/tests/config/write.c
@@ -712,10 +712,13 @@ void test_config_write__repeated(void)
 	cl_git_pass(git_config_set_string(cfg, "sample.prefix.setting2", "someValue2"));
 	cl_git_pass(git_config_set_string(cfg, "sample.prefix.setting3", "someValue3"));
 	cl_git_pass(git_config_set_string(cfg, "sample.prefix.setting4", "someValue4"));
+	git_config_free(cfg);
 
 	cl_git_pass(git_config_open_ondisk(&cfg, filename));
 
 	cl_git_pass(git_futils_readbuffer(&result, filename));
 	cl_assert_equal_s(expected, result.ptr);
 	git_buf_free(&result);
+
+	git_config_free(cfg);
 }