Use equality checking for NULL value

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei 2022-12-20 13:56:16 +01:00
parent f9728137d8
commit 496cd37bac
No known key found for this signature in database
GPG key ID: F072ACA227ACD71D

View file

@ -188,7 +188,7 @@ int mbedtls_mpi_mod_mul( mbedtls_mpi_mod_residue *X,
return MBEDTLS_ERR_MPI_BAD_INPUT_DATA;
mbedtls_mpi_uint *T = mbedtls_calloc( N->limbs * 2 + 1, ciL );
if( !T )
if( T == NULL )
return MBEDTLS_ERR_MPI_ALLOC_FAILED;
mbedtls_mpi_mod_raw_mul( X->p, A->p, B->p, N, T );