projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa9fb57
)
Fix a memory leak, and don't generate inappropriate error message
author
Bodo Möller
<bodo@openssl.org>
Tue, 2 May 2000 20:18:48 +0000
(20:18 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Tue, 2 May 2000 20:18:48 +0000
(20:18 +0000)
when PEM_read_bio_X509_REQ fails.
apps/x509.c
patch
|
blob
|
history
diff --git
a/apps/x509.c
b/apps/x509.c
index 2d6384184c9e08d2f3d82145a787718cab038ab1..5403576585adfe4bf4d7f93725ff4a8f806a0c33 100644
(file)
--- 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) ||