crypto/rand: close /dev/random on plan9 after seeding

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
guoguangwu 2024-03-24 22:32:42 +08:00
parent c2c4a32f9e
commit dbff3282e0
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ func (r *reader) Read(b []byte) (n int, err error) {
r.seedErr = err
return
}
defer entropy.Close()
_, r.seedErr = io.ReadFull(entropy, r.key[:])
})
if r.seedErr != nil {