From b31795ef2c7196fd81d7e8714fd95c1fed3b0a09 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Thu, 6 May 2021 01:46:19 +0100 Subject: test: clean up memory leaks --- src/transports/winhttp.c | 1 + tests/path/core.c | 3 +++ tests/refs/basic.c | 1 + 3 files changed, 5 insertions(+) diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c index 3da625aca..97ceab2d4 100644 --- a/src/transports/winhttp.c +++ b/src/transports/winhttp.c @@ -859,6 +859,7 @@ on_error: if (error < 0) winhttp_close_connection(t); + git_buf_dispose(&ua); git_buf_dispose(&ipv6); git__free(wide_host); git__free(wide_ua); diff --git a/tests/path/core.c b/tests/path/core.c index 672321646..c875a862c 100644 --- a/tests/path/core.c +++ b/tests/path/core.c @@ -361,6 +361,9 @@ void test_path_core__validate_workdir_with_core_longpath(void) /* set core.longpaths explicitly off */ cl_git_pass(git_config_set_bool(config, "core.longpaths", 0)); cl_must_fail(git_path_validate_workdir(repo, "/c/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/longer_than_260.txt")); + + git_config_free(config); + git_repository_free(repo); #endif } diff --git a/tests/refs/basic.c b/tests/refs/basic.c index d1ec2bbe6..9e4c22964 100644 --- a/tests/refs/basic.c +++ b/tests/refs/basic.c @@ -80,5 +80,6 @@ void test_refs_basic__longpaths(void) git_reference_free(one); git_reference_free(two); + git_buf_dispose(&refname); #endif } -- cgit v1.2.1