diff options
author | Rich Salz <rsalz@akamai.com> | 2015-03-24 10:17:37 -0400 |
---|---|---|
committer | Rich Salz <rsalz@akamai.com> | 2015-03-24 23:17:16 -0400 |
commit | d64070838ebba86f00fb3755df5d3e65106e1628 (patch) | |
tree | def90b3063d9ebe0f53920604d02b9786216e327 /apps/dhparam.c | |
parent | 1300705a47b9c9498b15a384c6c5348adc342e2c (diff) |
free NULL cleanup
Start ensuring all OpenSSL "free" routines allow NULL, and remove
any if check before calling them.
This gets DH_free, DSA_free, RSA_free
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps/dhparam.c')
-rw-r--r-- | apps/dhparam.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/dhparam.c b/apps/dhparam.c index 0e6a3c3198..12a2be6455 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -319,8 +319,7 @@ int MAIN(int argc, char **argv) if (!dsa || !DSA_generate_parameters_ex(dsa, num, NULL, 0, NULL, NULL, cb)) { - if (dsa) - DSA_free(dsa); + DSA_free(dsa); BN_GENCB_free(cb); ERR_print_errors(bio_err); goto end; @@ -520,8 +519,7 @@ int MAIN(int argc, char **argv) BIO_free(in); if (out != NULL) BIO_free_all(out); - if (dh != NULL) - DH_free(dh); + DH_free(dh); apps_shutdown(); OPENSSL_EXIT(ret); } |