From f88526ae788d2449c7a1b2c2597902377c99a535 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 27 Apr 2020 11:07:29 -0500 Subject: [PATCH] hcrypto: Fix leaks in test_rsa.c --- lib/hcrypto/test_rsa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/hcrypto/test_rsa.c b/lib/hcrypto/test_rsa.c index 54b7a66c5..c9766b8b3 100644 --- a/lib/hcrypto/test_rsa.c +++ b/lib/hcrypto/test_rsa.c @@ -292,6 +292,7 @@ main(int argc, char **argv) if (RSA_generate_key_ex(rsa, 1024, e, NULL) != 1) errx(1, "RSA_generate_key_ex"); + BN_free(e); } else { rsa = read_key(engine, time_key); } @@ -314,6 +315,7 @@ main(int argc, char **argv) RSA_free(rsa); ENGINE_finish(engine); + free(p); return 0; }