diff options
author | Eric Wong <e@80x24.org> | 2023-07-31 12:08:07 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-31 08:57:15 -0700 |
commit | 8b608f3fb84388bb1b6da70feb62e20a19390cb6 (patch) | |
tree | 3457574a965687827c816b1f8429d4f23d698b56 /object-file.c | |
parent | b4b85e41a74eaf61dfb490004541622e63df092b (diff) |
sha256/gcrypt: fix memory leak with SHA-256 repos
`gcry_md_open' needs to be paired with `gcry_md_close' to ensure
resources are released. Since our internal APIs don't have
separate close/release callbacks, sticking it into the finalization
callback seems appropriate.
Building with SANITIZE=leak and running `git fsck' on a SHA-256
repository no longer reports leaks.
Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-file.c')
0 files changed, 0 insertions, 0 deletions