aboutsummaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-08-11 16:28:00 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-08-24 11:19:28 +1000
commitfdf6118b1552bc723aeba726174b14ca07b5170a (patch)
tree8911c73bd78238db72b90ed8333c2c6943e77feb /providers
parent26c5ea8f6168bba5c0879ac7b9bc62ed4e8d469c (diff)
downloadopenssl-fdf6118b1552bc723aeba726174b14ca07b5170a.tar.gz
Fix coverity CID #1458647 - Use after free in clean_tbuf() which uses ctx->rsa
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12628)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/signature/rsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/providers/implementations/signature/rsa.c b/providers/implementations/signature/rsa.c
index 1f1aab2c30..7e2de96e83 100644
--- a/providers/implementations/signature/rsa.c
+++ b/providers/implementations/signature/rsa.c
@@ -832,12 +832,12 @@ static void rsa_freectx(void *vprsactx)
if (prsactx == NULL)
return;
- RSA_free(prsactx->rsa);
EVP_MD_CTX_free(prsactx->mdctx);
EVP_MD_free(prsactx->md);
EVP_MD_free(prsactx->mgf1_md);
OPENSSL_free(prsactx->propq);
free_tbuf(prsactx);
+ RSA_free(prsactx->rsa);
OPENSSL_clear_free(prsactx, sizeof(*prsactx));
}