summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/ecdh/ecdhtest.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/ecdh/ecdhtest.c b/src/regress/lib/libcrypto/ecdh/ecdhtest.c
index 620424dbdb..d6cb61d460 100644
--- a/src/regress/lib/libcrypto/ecdh/ecdhtest.c
+++ b/src/regress/lib/libcrypto/ecdh/ecdhtest.c
@@ -358,7 +358,7 @@ static int ecdh_kat(BIO *out, const char *cname, int nid,
358 Ztmplen = (EC_GROUP_get_degree(EC_KEY_get0_group(key1)) + 7)/8; 358 Ztmplen = (EC_GROUP_get_degree(EC_KEY_get0_group(key1)) + 7)/8;
359 if (Ztmplen != Zlen) 359 if (Ztmplen != Zlen)
360 goto err; 360 goto err;
361 Ztmp = OPENSSL_malloc(Ztmplen); 361 Ztmp = malloc(Ztmplen);
362 if (!ECDH_compute_key(Ztmp, Ztmplen, 362 if (!ECDH_compute_key(Ztmp, Ztmplen,
363 EC_KEY_get0_public_key(key2), key1, 0)) 363 EC_KEY_get0_public_key(key2), key1, 0))
364 goto err; 364 goto err;
@@ -376,8 +376,7 @@ static int ecdh_kat(BIO *out, const char *cname, int nid,
376 EC_KEY_free(key1); 376 EC_KEY_free(key1);
377 if (key2) 377 if (key2)
378 EC_KEY_free(key2); 378 EC_KEY_free(key2);
379 if (Ztmp) 379 free(Ztmp);
380 OPENSSL_free(Ztmp);
381 if (rv) 380 if (rv)
382 BIO_puts(out, " ok\n"); 381 BIO_puts(out, " ok\n");
383 else 382 else