Add ASN.1 API to free linked list representation of ASN.1 sequences
diff --git a/library/asn1parse.c b/library/asn1parse.c
index f24fee6..68a70e6 100644
--- a/library/asn1parse.c
+++ b/library/asn1parse.c
@@ -229,6 +229,16 @@
     return( 0 );
 }
 
+void mbedtls_asn1_sequence_free( mbedtls_asn1_sequence *seq )
+{
+    while( seq != NULL )
+    {
+        mbedtls_asn1_sequence *next = seq->next;
+        mbedtls_platform_zeroize( seq, sizeof( *seq ) );
+        mbedtls_free( seq );
+        seq = next;
+    }
+}
 
 /*
  * Traverse an ASN.1 "SEQUENCE OF <tag>"
diff --git a/library/x509.c b/library/x509.c
index 627a5a3..f1c96a8 100644
--- a/library/x509.c
+++ b/library/x509.c
@@ -1220,17 +1220,6 @@
     }
 }
 
-void mbedtls_x509_sequence_free( mbedtls_x509_sequence *seq )
-{
-    while( seq != NULL )
-    {
-        mbedtls_x509_sequence *next = seq->next;
-        mbedtls_platform_zeroize( seq, sizeof( *seq ) );
-        mbedtls_free( seq );
-        seq = next;
-    }
-}
-
 #if defined(MBEDTLS_SELF_TEST)
 
 #include "mbedtls/x509_crt.h"