diff options
author | Bodo Möller <bodo@openssl.org> | 2000-05-02 20:18:48 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-05-02 20:18:48 +0000 |
commit | c4d0df0c4f92c5964af8e869907c4a4921492484 (patch) | |
tree | 09027e453dd7127fa4a9b2804033ad291b8dd123 /apps | |
parent | aa9fb57b99d02bf9ec7918370b79c1a61b8bfc48 (diff) | |
download | openssl-c4d0df0c4f92c5964af8e869907c4a4921492484.tar.gz |
Fix a memory leak, and don't generate inappropriate error message
when PEM_read_bio_X509_REQ fails.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/x509.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/x509.c b/apps/x509.c index 2d6384184c..5403576585 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -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) || |