Make malloc-init script a bit happier
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 6193ecd..2d72f6a 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -819,8 +819,8 @@
             return( POLARSSL_ERR_X509_MALLOC_FAILED );
 
         prev = crt;
+        x509_crt_init( crt->next );
         crt = crt->next;
-        x509_crt_init( crt );
     }
 
     if( ( ret = x509_crt_parse_der_core( crt, buf, buflen ) ) != 0 )