mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 14:57:49 +00:00
util/deephash: fix sync.Pool usage
Whoops. From yesterday's 9ae3bd09394c8d41bc065fdf8856739b468f51f7 (not yet used by anything, fortunately) Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
e0258ffd92
commit
14f901da6d
@ -53,7 +53,7 @@ func (h *hasher) Hash(v interface{}) (hash [sha256.Size]byte) {
|
||||
// Hash returns the raw SHA-256 hash of v.
|
||||
func Hash(v interface{}) [sha256.Size]byte {
|
||||
hasher := hasherPool.Get().(*hasher)
|
||||
hasherPool.Put(hasher)
|
||||
defer hasherPool.Put(hasher)
|
||||
return hasher.Hash(v)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user