Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Invalidate buf pointer after returning it to the pool
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
  • Loading branch information
Jakub Sztandera committed Oct 6, 2019
1 parent 29aeb2c commit 9e34967
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions buzhash.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func (b *Buzhash) NextBytes() ([]byte, error) {
} else {
b.err = err
pool.Put(buf)
b.buf = nil
return nil, err
}
}
Expand Down

0 comments on commit 9e34967

Please sign in to comment.