Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1641 #1642

Merged
merged 2 commits into from Apr 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions utils.go
Expand Up @@ -510,11 +510,11 @@ var (
)

func newMd5Hasher() md5simd.Hasher {
return hashWrapper{Hash: md5Pool.Get().(hash.Hash), isMD5: true}
return &hashWrapper{Hash: md5Pool.Get().(hash.Hash), isMD5: true}
}

func newSHA256Hasher() md5simd.Hasher {
return hashWrapper{Hash: sha256Pool.Get().(hash.Hash), isSHA256: true}
return &hashWrapper{Hash: sha256Pool.Get().(hash.Hash), isSHA256: true}
}

// hashWrapper implements the md5simd.Hasher interface.
Expand All @@ -525,7 +525,7 @@ type hashWrapper struct {
}

// Close will put the hasher back into the pool.
func (m hashWrapper) Close() {
func (m *hashWrapper) Close() {
if m.isMD5 && m.Hash != nil {
m.Reset()
md5Pool.Put(m.Hash)
Expand Down