summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/dhparam.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/usr.bin/openssl/dhparam.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/usr.bin/openssl/dhparam.c b/src/usr.bin/openssl/dhparam.c
index 7c3bfb44c8..13e8a49a1c 100644
--- a/src/usr.bin/openssl/dhparam.c
+++ b/src/usr.bin/openssl/dhparam.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dhparam.c,v 1.9 2017/01/20 08:57:11 deraadt Exp $ */ 1/* $OpenBSD: dhparam.c,v 1.10 2018/02/07 04:57:06 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -292,8 +292,7 @@ dhparam_main(int argc, char **argv)
292 BIO_printf(bio_err, "Generating DSA parameters, %d bit long prime\n", num); 292 BIO_printf(bio_err, "Generating DSA parameters, %d bit long prime\n", num);
293 if (!dsa || !DSA_generate_parameters_ex(dsa, num, 293 if (!dsa || !DSA_generate_parameters_ex(dsa, num,
294 NULL, 0, NULL, NULL, &cb)) { 294 NULL, 0, NULL, NULL, &cb)) {
295 if (dsa) 295 DSA_free(dsa);
296 DSA_free(dsa);
297 ERR_print_errors(bio_err); 296 ERR_print_errors(bio_err);
298 goto end; 297 goto end;
299 } 298 }
@@ -469,10 +468,8 @@ dhparam_main(int argc, char **argv)
469 468
470end: 469end:
471 BIO_free(in); 470 BIO_free(in);
472 if (out != NULL) 471 BIO_free_all(out);
473 BIO_free_all(out); 472 DH_free(dh);
474 if (dh != NULL)
475 DH_free(dh);
476 473
477 return (ret); 474 return (ret);
478} 475}