Skip to content

Commit

Permalink
Refactor[entropy]: nil out rand pointer after we put it back into the…
Browse files Browse the repository at this point in the history
… pool
  • Loading branch information
yunginnanet committed Sep 7, 2023
1 parent 325ccd9 commit 917be20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions entropy/entropy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 917be20

Please sign in to comment.