summaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorPetr Gotthard <petr.gotthard@centrum.cz>2021-04-17 14:58:30 +0200
committerTomas Mraz <tomas@openssl.org>2021-04-21 09:00:20 +0200
commita2502862f679c82b794869ac88ed0d8ca7bc291c (patch)
treeadda679be755391e80e225ca380c30d65fc211b1 /crypto/x509
parentapps/cmp.c: Fix double free on OSSL_CMP_CTX_set1_p10CSR() failure (diff)
downloadopenssl-a2502862f679c82b794869ac88ed0d8ca7bc291c.tar.xz
openssl-a2502862f679c82b794869ac88ed0d8ca7bc291c.zip
Fix memory leak in X509_REQ
The propq is strdup'ed in X509_REQ_new_ex, but never freed. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14907)
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x_req.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/x509/x_req.c b/crypto/x509/x_req.c
index edbe8cd72b..1b4e1587dd 100644
--- a/crypto/x509/x_req.c
+++ b/crypto/x509/x_req.c
@@ -60,6 +60,7 @@ static int req_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
case ASN1_OP_FREE_POST:
ASN1_OCTET_STRING_free(ret->distinguishing_id);
+ OPENSSL_free(ret->propq);
break;
case ASN1_OP_DUP_POST:
{