Rename ERR_xxx_MALLOC_FAILED to ..._ALLOC_FAILED
diff --git a/library/x509_crt.c b/library/x509_crt.c
index e46c934..8967337 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -363,7 +363,7 @@
 
             if( cur->next == NULL )
                 return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS +
-                        MBEDTLS_ERR_ASN1_MALLOC_FAILED );
+                        MBEDTLS_ERR_ASN1_ALLOC_FAILED );
 
             cur = cur->next;
         }
@@ -554,7 +554,7 @@
 
     p = mbedtls_calloc( 1, len = buflen );
     if( p == NULL )
-        return( MBEDTLS_ERR_X509_MALLOC_FAILED );
+        return( MBEDTLS_ERR_X509_ALLOC_FAILED );
 
     memcpy( p, buf, buflen );
 
@@ -810,7 +810,7 @@
         crt->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_crt ) );
 
         if( crt->next == NULL )
-            return( MBEDTLS_ERR_X509_MALLOC_FAILED );
+            return( MBEDTLS_ERR_X509_ALLOC_FAILED );
 
         prev = crt;
         mbedtls_x509_crt_init( crt->next );
@@ -919,7 +919,7 @@
                 /*
                  * Quit parsing on a memory error
                  */
-                if( ret == MBEDTLS_ERR_X509_MALLOC_FAILED )
+                if( ret == MBEDTLS_ERR_X509_ALLOC_FAILED )
                     return( ret );
 
                 if( first_error == 0 )