Add new error code PLATFORM_ALLOC_FAILED for mbedtls_platform_memmove()
Signed-off-by: Piotr Nowicki <piotr.nowicki@arm.com>
diff --git a/library/bignum.c b/library/bignum.c
index 2cc8e22..f4ab0db 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -558,11 +558,7 @@
length++;
} while( mbedtls_mpi_cmp_int( X, 0 ) != 0 );
- if( 0 != mbedtls_platform_memmove( *p, p_end, length ) )
- {
- ret = MBEDTLS_ERR_MPI_ALLOC_FAILED;
- goto cleanup;
- }
+ MBEDTLS_MPI_CHK( mbedtls_platform_memmove( *p, p_end, length ) );
*p += length;
cleanup: