diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 11:18:04 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 22:48:41 +0000 |
commit | 96487cddd408e247819c4f122bd86e53ae4bd6c0 (patch) | |
tree | f6b424b2ce4d1d6ae2604b26d9fb956e13f932a2 /apps/dhparam.c | |
parent | 90945fa31a42dcf3beb90540c618e4d627c595ea (diff) |
Continue standardisation of malloc handling in apps
continue on from previous commits but in the apps directory
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'apps/dhparam.c')
-rw-r--r-- | apps/dhparam.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/dhparam.c b/apps/dhparam.c index 17c0b5b420..e794dacd1d 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -251,7 +251,7 @@ int dhparam_main(int argc, char **argv) BN_GENCB *cb; cb = BN_GENCB_new(); - if (!cb) { + if (cb == NULL) { ERR_print_errors(bio_err); goto end; } @@ -271,7 +271,7 @@ int dhparam_main(int argc, char **argv) BIO_printf(bio_err, "Generating DSA parameters, %d bit long prime\n", num); - if (!dsa + if (dsa == NULL || !DSA_generate_parameters_ex(dsa, num, NULL, 0, NULL, NULL, cb)) { DSA_free(dsa); @@ -295,7 +295,7 @@ int dhparam_main(int argc, char **argv) "Generating DH parameters, %d bit long safe prime, generator %d\n", num, g); BIO_printf(bio_err, "This is going to take a long time\n"); - if (!dh || !DH_generate_parameters_ex(dh, num, g, cb)) { + if (dh == NULL || !DH_generate_parameters_ex(dh, num, g, cb)) { BN_GENCB_free(cb); ERR_print_errors(bio_err); goto end; |