Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-08-14 19:24:02 +0300
committerAdam Langley <agl@google.com>2015-08-17 23:35:10 +0300
commit8745865451a26c2bca339f316304de41838b4f91 (patch)
tree58e0bb290b4f118b5ff0a845a912ebc406699975 /crypto/x509
parenta6ee3de08eea8c9eb645d90b6f265c1ffa8c0064 (diff)
Fix a couple other leaks on failure in X509_verify_cert.
If get_issuer fails, some of these calls return rather than jumping to common cleanup code. Change-Id: Iacd59747fb11e9bfaae86f2eeed88798ee08203e Reviewed-on: https://boringssl-review.googlesource.com/5711 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509_vfy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index 4545d9d3..c22ad34d 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -252,7 +252,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
{
ok = ctx->get_issuer(&xtmp, ctx, x);
if (ok < 0)
- return ok;
+ goto end;
/* If successful for now free up cert so it
* will be picked up again later.
*/
@@ -350,7 +350,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
ok = ctx->get_issuer(&xtmp, ctx, x);
- if (ok < 0) return ok;
+ if (ok < 0) goto end;
if (ok == 0) break;
x = xtmp;