]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix memory leak in X509_REQ
authorPetr Gotthard <petr.gotthard@centrum.cz>
Sat, 17 Apr 2021 12:58:30 +0000 (14:58 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 21 Apr 2021 07:00:20 +0000 (09:00 +0200)
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)

crypto/x509/x_req.c

index edbe8cd72bf1f40ed8d0ffebcc7142e93f35d6f1..1b4e1587dd12ba3f16800cfe09631563cfb068e7 100644 (file)
@@ -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:
         {