key_A and key_B had 3 references, only 2 were freed.
authorPatrick Steuer <patrick.steuer@de.ibm.com>
Mon, 4 Dec 2017 15:23:24 +0000 (10:23 -0500)
committerRich Salz <rsalz@openssl.org>
Mon, 4 Dec 2017 15:23:24 +0000 (10:23 -0500)
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4837)

apps/speed.c

index bca2968..271472e 100644 (file)
@@ -2819,6 +2819,8 @@ int speed_main(int argc, char **argv)
             loopargs[i].ecdh_ctx[testnum] = ctx;
             loopargs[i].outlen[testnum] = outlen;
 
+            EVP_PKEY_free(key_A);
+            EVP_PKEY_free(key_B);
             EVP_PKEY_CTX_free(kctx);
             kctx = NULL;
             EVP_PKEY_CTX_free(test_ctx);