diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-04-21 13:28:00 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-04-22 20:39:00 +0200 |
commit | ef203432f7b551382216e9aa7de00039e6d45ac0 (patch) | |
tree | 29a89425afc407737375cc58858cc200b35f1968 /apps/cmp.c | |
parent | 078fa35c7bd7e7392b07e032297a341fef695c42 (diff) |
apps/cmp.c and APP_HTTP_TLS_INFO: Fix use-after-free and add proper free() function
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14971)
Diffstat (limited to 'apps/cmp.c')
-rw-r--r-- | apps/cmp.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/apps/cmp.c b/apps/cmp.c index da28c3215e..1fbf10c4a4 100644 --- a/apps/cmp.c +++ b/apps/cmp.c @@ -2851,15 +2851,7 @@ int cmp_main(int argc, char **argv) OSSL_CMP_CTX_print_errors(cmp_ctx); ossl_cmp_mock_srv_free(OSSL_CMP_CTX_get_transfer_cb_arg(cmp_ctx)); - { - APP_HTTP_TLS_INFO *http_tls_info = - OSSL_CMP_CTX_get_http_cb_arg(cmp_ctx); - - if (http_tls_info != NULL) { - SSL_CTX_free(http_tls_info->ssl_ctx); - OPENSSL_free(http_tls_info); - } - } + APP_HTTP_TLS_INFO_free(OSSL_CMP_CTX_get_http_cb_arg(cmp_ctx)); X509_STORE_free(OSSL_CMP_CTX_get_certConf_cb_arg(cmp_ctx)); OSSL_CMP_CTX_free(cmp_ctx); X509_VERIFY_PARAM_free(vpm); |