From 9e34967aef4741b48009afa8d40e31981880ad83 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Sun, 6 Oct 2019 13:56:15 +0200 Subject: [PATCH] Invalidate buf pointer after returning it to the pool License: MIT Signed-off-by: Jakub Sztandera --- buzhash.go | 1 + 1 file changed, 1 insertion(+) diff --git a/buzhash.go b/buzhash.go index 4bbe009..40b2e93 100644 --- a/buzhash.go +++ b/buzhash.go @@ -42,6 +42,7 @@ func (b *Buzhash) NextBytes() ([]byte, error) { } else { b.err = err pool.Put(buf) + b.buf = nil return nil, err } } -- GitLab