aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
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
parent4e030ed45dbf56be2f09d86f76f697ae6a0c567f (diff)
downloadopenssl-a2502862f679c82b794869ac88ed0d8ca7bc291c.tar.gz
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')
-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:
{