Merge pull request #3523 from pks-t/memleak-fixes Memleak fixes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/tests/config/global.c b/tests/config/global.c
index 0ddd204..a149dc0 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,
diff --git a/tests/config/stress.c b/tests/config/stress.c
index 6e96042..a6b6655 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);
}
diff --git a/tests/win32/longpath.c b/tests/win32/longpath.c
index 6de7d38..07eecd3 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