1
0
mirror of https://github.com/golang/go synced 2024-11-12 06:20:22 -07: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:
Alex Brainman 2012-03-10 09:35:56 +11:00
parent 3cea4131df
commit 9fffe45c65

View File

@ -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
}