mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-14 15:30:43 +00:00
tests: nsec: correctly free nsec_path
git_buf_clear does not free allocated memory associated with a git_buf. Use `git_buf_free` instead to correctly free its memory and plug the memory leak.
This commit is contained in:
parent
2ba9a0ddac
commit
e756877dbf
@ -56,7 +56,7 @@ static bool should_expect_nsecs(void)
|
|||||||
|
|
||||||
p_unlink(nsec_path.ptr);
|
p_unlink(nsec_path.ptr);
|
||||||
|
|
||||||
git_buf_clear(&nsec_path);
|
git_buf_free(&nsec_path);
|
||||||
|
|
||||||
return expect;
|
return expect;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user