mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-08 07:29:41 +00:00
Remove unnecessary check and call BIO_free_all() on bio_out to avoid a
leak on VMS.
This commit is contained in:
parent
18ad97bbe7
commit
6826d26ea7
@ -61,7 +61,7 @@ int MAIN(int argc, char **argv)
|
|||||||
int hex=0;
|
int hex=0;
|
||||||
int checks=20;
|
int checks=20;
|
||||||
BIGNUM *bn=NULL;
|
BIGNUM *bn=NULL;
|
||||||
BIO *bio_out=NULL;
|
BIO *bio_out;
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@ -95,7 +95,6 @@ int MAIN(int argc, char **argv)
|
|||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bio_out == NULL)
|
|
||||||
if ((bio_out=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_out=BIO_new(BIO_s_file())) != NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
|
||||||
@ -117,7 +116,7 @@ int MAIN(int argc, char **argv)
|
|||||||
BN_is_prime(bn,checks,NULL,NULL,NULL) ? "" : "not ");
|
BN_is_prime(bn,checks,NULL,NULL,NULL) ? "" : "not ");
|
||||||
|
|
||||||
BN_free(bn);
|
BN_free(bn);
|
||||||
BIO_free(bio_out);
|
BIO_free_all(bio_out);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -125,5 +124,5 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf(bio_err,"options are\n");
|
BIO_printf(bio_err,"options are\n");
|
||||||
BIO_printf(bio_err,"%-14s hex\n","-hex");
|
BIO_printf(bio_err,"%-14s hex\n","-hex");
|
||||||
BIO_printf(bio_err,"%-14s number of checks\n","-checks <n>");
|
BIO_printf(bio_err,"%-14s number of checks\n","-checks <n>");
|
||||||
exit(1);
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user