diff options
author | Ismo Puustinen <ismo.puustinen@intel.com> | 2015-08-07 22:11:28 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-08-13 12:13:49 -0400 |
commit | cc2829e6641092abed8360433dbe67e883fd1cc6 (patch) | |
tree | 0a16d808dc51b259927702c86781240bbb42a80d /crypto | |
parent | df758a8569efe9e124baaa16aba4ac3fc35bbd9d (diff) |
GH364: Free memory on an error path
Part of RT 3997
Per Ben, just jump to common exit code.
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/x509/x509_vfy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 26867cb4c2..6b1f7febff 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -348,7 +348,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) if (!sk_X509_push(ctx->chain, x)) { X509_free(xtmp); X509err(X509_F_X509_VERIFY_CERT, ERR_R_MALLOC_FAILURE); - return 0; + ok = 0; + goto done; } num++; } |