From c8fab201ebbb9d3c871a7ca426e780b90271a8e0 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 24 Nov 2015 14:29:32 +0100 Subject: [PATCH 1/3] tests: config::global: fix memleak in open_programdata --- tests/config/global.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/global.c b/tests/config/global.c index 0ddd204ad..a149dc0be 100644 --- a/tests/config/global.c +++ b/tests/config/global.c @@ -73,7 +73,7 @@ void test_config_global__open_programdata(void) git_buf config_path = GIT_BUF_INIT; git_buf var_contents = GIT_BUF_INIT; - if (!cl_getenv("GITTEST_INVASIVE_FS_STRUCTURE")) + if (cl_is_env_set("GITTEST_INVASIVE_FS_STRUCTURE")) cl_skip(); cl_git_pass(git_libgit2_opts(GIT_OPT_GET_SEARCH_PATH, From 9031be180b67b50a14cacae7ff9a8b5216ca1e8a Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 24 Nov 2015 14:38:17 +0100 Subject: [PATCH 2/3] tests: config::stress: free `git_config` structs --- tests/config/stress.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/config/stress.c b/tests/config/stress.c index 6e960425c..a6b665590 100644 --- a/tests/config/stress.c +++ b/tests/config/stress.c @@ -126,4 +126,7 @@ void test_config_stress__quick_write(void) cl_git_pass(git_config_get_int32(&val, config_r, key)); cl_assert_equal_i(i, val); } + + git_config_free(config_r); + git_config_free(config_w); } From 77b79dde84b6b53a3c9bdde844fcd2a73b9bcca7 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 24 Nov 2015 14:36:46 +0100 Subject: [PATCH 3/3] tests: win32::longpath: free expected_msg --- tests/win32/longpath.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/win32/longpath.c b/tests/win32/longpath.c index 6de7d389a..07eecd394 100644 --- a/tests/win32/longpath.c +++ b/tests/win32/longpath.c @@ -46,6 +46,8 @@ void assert_name_too_long(void) /* check the suffix */ cl_assert_equal_s(expected_msg, err->message + (actual_len - expected_len)); + + git__free(expected_msg); } #endif