crypto/rand: add missing Unlock

R=r
CC=golang-dev
https://golang.org/cl/1812043
This commit is contained in:
Russ Cox 2010-07-13 12:37:47 -07:00
parent 0c2e6b3637
commit 2e3dc2cc35
2 changed files with 2 additions and 0 deletions

View file

@ -32,6 +32,7 @@ func (r *devReader) Read(b []byte) (n int, err os.Error) {
if r.f == nil {
f, err := os.Open(r.name, os.O_RDONLY, 0)
if f == nil {
r.mu.Unlock()
return 0, err
}
r.f = f