mirror of
https://github.com/golang/go
synced 2024-11-02 08:01:26 +00:00
crypto/x509: do not forget to free cert context
R=golang-dev, krautz, rsc CC=golang-dev https://golang.org/cl/5783059
This commit is contained in:
parent
3cea4131df
commit
9fffe45c65
1 changed files with 1 additions and 5 deletions
|
@ -45,11 +45,7 @@ func createStoreContext(leaf *Certificate, opts *VerifyOptions) (*syscall.CertCo
|
|||
}
|
||||
|
||||
err = syscall.CertAddCertificateContextToStore(handle, ctx, syscall.CERT_STORE_ADD_ALWAYS, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = syscall.CertFreeCertificateContext(ctx)
|
||||
syscall.CertFreeCertificateContext(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue