]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix a memory leak in the speed app
authorMatt Caswell <matt@openssl.org>
Mon, 12 Aug 2024 08:04:19 +0000 (09:04 +0100)
committerTomas Mraz <tomas@openssl.org>
Wed, 14 Aug 2024 16:22:10 +0000 (18:22 +0200)
Make sure we free the ecdsa_key object after we have finished using it.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25153)

apps/speed.c

index 5ef378aef8dc57beaa3ad80203e5370829777994..dc3fe0c780678cb04e6dd8d6d47cfe022a6d473d 100644 (file)
@@ -3266,6 +3266,7 @@ int speed_main(int argc, char **argv)
             /* if longer than 10s, don't do any more */
             stop_it(ecdsa_doit, testnum);
         }
+        EVP_PKEY_free(ecdsa_key);
     }
 
     for (testnum = 0; testnum < EC_NUM; testnum++) {