Skip to content

Commit b31795e

Browse files
committed
test: clean up memory leaks
1 parent 525516b commit b31795e

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/transports/winhttp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,7 @@ static int winhttp_connect(
859859
if (error < 0)
860860
winhttp_close_connection(t);
861861

862+
git_buf_dispose(&ua);
862863
git_buf_dispose(&ipv6);
863864
git__free(wide_host);
864865
git__free(wide_ua);

tests/path/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ void test_path_core__validate_workdir_with_core_longpath(void)
361361
/* set core.longpaths explicitly off */
362362
cl_git_pass(git_config_set_bool(config, "core.longpaths", 0));
363363
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"));
364+
365+
git_config_free(config);
366+
git_repository_free(repo);
364367
#endif
365368
}
366369

tests/refs/basic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,6 @@ void test_refs_basic__longpaths(void)
8080

8181
git_reference_free(one);
8282
git_reference_free(two);
83+
git_buf_dispose(&refname);
8384
#endif
8485
}

0 commit comments

Comments
 (0)