Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information