diff options
author | Benjamin Kaduk <bkaduk@akamai.com> | 2017-10-27 09:52:06 -0500 |
---|---|---|
committer | Ben Kaduk <kaduk@mit.edu> | 2017-10-30 10:38:01 -0500 |
commit | 85155346b3ca2dcdecf018dc8db9df94ceebeb0d (patch) | |
tree | dac155c713bb354643abf465db20696bda91bbf3 /test/crltest.c | |
parent | 23fa978994b52ac60c1fcbe1e094d65d7c78c7bb (diff) |
Fix memory leak in crltest error case
This would cut out some distracting noise in the test output
if we ended up hitting these error cases.
Reported by Coverity.
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/4602)
Diffstat (limited to 'test/crltest.c')
-rw-r--r-- | test/crltest.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/crltest.c b/test/crltest.c index 5ea9cdc4ee..738ca23ce5 100644 --- a/test/crltest.c +++ b/test/crltest.c @@ -267,6 +267,7 @@ static int verify(X509 *leaf, X509 *root, STACK_OF(X509_CRL) *crls, if (flags) X509_VERIFY_PARAM_set_flags(param, flags); X509_STORE_CTX_set0_param(ctx, param); + param = NULL; ERR_clear_error(); status = X509_verify_cert(ctx) == 1 ? X509_V_OK @@ -274,6 +275,7 @@ static int verify(X509 *leaf, X509 *root, STACK_OF(X509_CRL) *crls, err: sk_X509_pop_free(roots, X509_free); sk_X509_CRL_pop_free(crls, X509_CRL_free); + X509_VERIFY_PARAM_free(param); X509_STORE_CTX_free(ctx); X509_STORE_free(store); return status; |