8000 tests: fix memory leak · libgit2/libgit2@d181f05 · GitHub
[go: up one dir, main page]

Skip to content

Commit d181f05

Browse files
committed
tests: fix memory leak
1 parent 2119536 commit d181f05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/hook/enumerate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void test_hook_enumerate__foreach_hooks_config_override(void)
5151
cl_git_pass(git_config_set_string(cfg, "core.hooksPath", ALT_HOOK_DIR));
5252

5353
cl_git_pass(git_hook_dir(&alt_hook_str, g_repo));
54-
cl_git_pass(git_buf_sets(&alt_hook, alt_hook_str));
54+
git_buf_attach(&alt_hook, alt_hook_str, < 4874 /span>strlen(alt_hook_str));
5555

5656
/* Setup an alternate hook directory */
5757
cl_must_pass(p_mkdir(git_buf_cstr(&alt_hook), 0777));

0 commit comments

Comments
 (0)
0