summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2018-10-06 10:21:56 +0000
committertb <>2018-10-06 10:21:56 +0000
commit29ddf5f399442d553affe73458040202148371c9 (patch)
tree527ea42eee7c67c08d0d623351abf46c1c9ae975
parent68398a11c328b8a379c929ba0344d74a29a074c9 (diff)
downloadopenbsd-29ddf5f399442d553affe73458040202148371c9.tar.gz
openbsd-29ddf5f399442d553affe73458040202148371c9.tar.bz2
openbsd-29ddf5f399442d553affe73458040202148371c9.zip
free EC_POINT and EC_GROUP
-rw-r--r--src/regress/lib/libcrypto/wycheproof/wycheproof.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go
index 61dec505a8..f1a2fe9730 100644
--- a/src/regress/lib/libcrypto/wycheproof/wycheproof.go
+++ b/src/regress/lib/libcrypto/wycheproof/wycheproof.go
@@ -1,4 +1,4 @@
1/* $OpenBSD: wycheproof.go,v 1.74 2018/10/06 09:27:40 tb Exp $ */ 1/* $OpenBSD: wycheproof.go,v 1.75 2018/10/06 10:21:56 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
@@ -1323,10 +1323,13 @@ func runECDHWebCryptoTest(nid int, wt *wycheproofTestECDHWebCrypto) bool {
1323 if group == nil { 1323 if group == nil {
1324 log.Fatal("Failed to get EC_GROUP") 1324 log.Fatal("Failed to get EC_GROUP")
1325 } 1325 }
1326 defer C.EC_GROUP_free(group)
1327
1326 pubPoint := C.EC_POINT_new(group) 1328 pubPoint := C.EC_POINT_new(group)
1327 if pubPoint == nil { 1329 if pubPoint == nil {
1328 log.Fatal("Failed to create EC_POINT") 1330 log.Fatal("Failed to create EC_POINT")
1329 } 1331 }
1332 defer C.EC_POINT_free(pubPoint)
1330 1333
1331 var bnX *C.BIGNUM 1334 var bnX *C.BIGNUM
1332 x, err := base64.RawURLEncoding.DecodeString(wt.Public.X) 1335 x, err := base64.RawURLEncoding.DecodeString(wt.Public.X)