From d796aa12fc100a7b0b235734cbb114501117caa5 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Wed, 7 Jun 2023 13:29:41 -0600 Subject: [PATCH] free up memory with othername object on error --- src/x509.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/x509.c b/src/x509.c index dc8bc4adc..45a58b9ff 100644 --- a/src/x509.c +++ b/src/x509.c @@ -586,6 +586,7 @@ static int wolfssl_dns_entry_othername_to_gn(DNS_entry* dns, /* Next is: [0]. Check tag and length. */ if (GetASNTag(p, &idx, &tag, (word32)len) < 0) { + wolfSSL_ASN1_OBJECT_free(obj); goto err; } if (tag != (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | 0)) {