From a2502862f679c82b794869ac88ed0d8ca7bc291c Mon Sep 17 00:00:00 2001 From: Petr Gotthard Date: Sat, 17 Apr 2021 14:58:30 +0200 Subject: [PATCH] Fix memory leak in X509_REQ The propq is strdup'ed in X509_REQ_new_ex, but never freed. Reviewed-by: Shane Lontis Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14907) --- crypto/x509/x_req.c | 1 + 1 file changed, 1 insertion(+) 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: {