Make use of CRT acquire/release in x509_serial_is_revoked()
diff --git a/library/x509_crt.c b/library/x509_crt.c
index d7abb9b..bd3a7da 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -2228,9 +2228,18 @@
 int mbedtls_x509_crt_is_revoked( const mbedtls_x509_crt *crt,
                                  const mbedtls_x509_crl *crl )
 {
-    return( x509_serial_is_revoked( crt->serial.p,
-                                    crt->serial.len,
-                                    crl ) );
+    int ret;
+    mbedtls_x509_crt_frame *frame;
+
+    ret = x509_crt_frame_acquire( crt, &frame );
+    if( ret != 0 )
+        return( MBEDTLS_ERR_X509_FATAL_ERROR );
+
+    ret = x509_serial_is_revoked( frame->serial.p,
+                                  frame->serial.len,
+                                  crl );
+    x509_crt_frame_release( crt, frame );
+    return( ret );
 }
 
 /*