Support SM2 certificate signing
[openssl.git] / crypto / x509 / x_x509.c
index 78e1a7569e521c13e69e720e0b2e3b0853c4892b..d91c2d24da1c59ad563fcb953e12a0e41fe57058 100644 (file)
@@ -53,6 +53,9 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
         sk_IPAddressFamily_pop_free(ret->rfc3779_addr, IPAddressFamily_free);
         ASIdentifiers_free(ret->rfc3779_asid);
 #endif
+#ifndef OPENSSL_NO_SM2
+        ASN1_OCTET_STRING_free(ret->sm2_id);
+#endif
 
         /* fall thru */