From 917be2058dbacc8fc7e0ed596f1ce1757dd0ce9b Mon Sep 17 00:00:00 2001 From: "kayos@tcp.direct" Date: Wed, 6 Sep 2023 23:39:14 -0700 Subject: [PATCH] Refactor[entropy]: nil out rand pointer after we put it back into the pool --- entropy/entropy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/entropy/entropy.go b/entropy/entropy.go index 54e9097..8c17b17 100644 --- a/entropy/entropy.go +++ b/entropy/entropy.go @@ -52,6 +52,7 @@ func AcquireRand() *rand.Rand { func ReleaseRand(r *rand.Rand) { lolXD.Put(r) + r = nil } // RandomStrChoice returns a random item from an input slice of strings.