hcrypto: Fix leaks in test_rsa.c

This commit is contained in:
Nicolas Williams
2020-04-27 11:07:29 -05:00
parent 32517c0627
commit f88526ae78

View File

@@ -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;
}