mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Fix a memory leak, and don't generate inappropriate error message
when PEM_read_bio_X509_REQ fails.
This commit is contained in:
parent
aa9fb57b99
commit
c4d0df0c4f
@ -474,13 +474,18 @@ bad:
|
||||
if (BIO_read_filename(in,infile) <= 0)
|
||||
{
|
||||
perror(infile);
|
||||
BIO_free(in);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
req=PEM_read_bio_X509_REQ(in,NULL,NULL,NULL);
|
||||
BIO_free(in);
|
||||
|
||||
if (req == NULL) { perror(infile); goto end; }
|
||||
if (req == NULL)
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ( (req->req_info == NULL) ||
|
||||
(req->req_info->pubkey == NULL) ||
|
||||
|
Loading…
Reference in New Issue
Block a user