From: Petr Gotthard Date: Sat, 17 Apr 2021 12:58:30 +0000 (+0200) Subject: Fix memory leak in X509_REQ X-Git-Tag: openssl-3.0.0-alpha15~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a2502862f679c82b794869ac88ed0d8ca7bc291c;p=thirdparty%2Fopenssl.git 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) --- diff --git a/crypto/x509/x_req.c b/crypto/x509/x_req.c index edbe8cd72bf..1b4e1587dd1 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: {