From: Adam Langley Date: Fri, 4 Dec 2009 03:33:23 +0000 (-0800) Subject: crypto/rsa: fix shadowing error. X-Git-Tag: weekly.2009-12-07~37 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e93132c982da55fdc92eab3d3aad14faac444717;p=gostls13.git crypto/rsa: fix shadowing error. Fixes bug 375. R=rsc https://golang.org/cl/165045 --- diff --git a/src/pkg/crypto/rsa/rsa.go b/src/pkg/crypto/rsa/rsa.go index 0576bb6a76..e47b02060f 100644 --- a/src/pkg/crypto/rsa/rsa.go +++ b/src/pkg/crypto/rsa/rsa.go @@ -159,12 +159,12 @@ func GenerateKey(rand io.Reader, bits int) (priv *PrivateKey, err os.Error) { for { p, err := randomSafePrime(rand, bits/2); if err != nil { - return + return nil, err } q, err := randomSafePrime(rand, bits/2); if err != nil { - return + return nil, err } if p.Cmp(q) == 0 {