diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2015-08-27 23:07:07 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-08-28 11:18:04 -0400 |
commit | 55500ea7c46c27a150a46832e1260891aaad8e52 (patch) | |
tree | bf39de9a96882dedcda432923886407cdaf2adcf /crypto/x509/x509_vfy.c | |
parent | f00a10b89734e84fe80f98ad9e2e77b557c701ae (diff) | |
download | openssl-55500ea7c46c27a150a46832e1260891aaad8e52.tar.gz |
GH354: Memory leak fixes
Fix more potential leaks in X509_verify_cert()
Fix memory leak in ClientHello test
Fix memory leak in gost2814789 test
Fix potential memory leak in PKCS7_verify()
Fix potential memory leaks in X509_add1_reject_object()
Refactor to use "goto err" in cleanup.
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'crypto/x509/x509_vfy.c')
-rw-r--r-- | crypto/x509/x509_vfy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 6b1f7febff..a3077b5cbc 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -243,7 +243,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx) if (ctx->param->flags & X509_V_FLAG_TRUSTED_FIRST) { 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. @@ -341,7 +341,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx) ok = ctx->get_issuer(&xtmp, ctx, x); if (ok < 0) - return ok; + goto end; if (ok == 0) break; x = xtmp; |