mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
crypto/rand: add missing Unlock
R=r CC=golang-dev https://golang.org/cl/1812043
This commit is contained in:
parent
0c2e6b3637
commit
2e3dc2cc35
2 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue