From 496cd37bacbfa3fbd6239ae2d9a5f8cc83d04811 Mon Sep 17 00:00:00 2001 From: Gabor Mezei Date: Tue, 20 Dec 2022 13:56:16 +0100 Subject: [PATCH] Use equality checking for NULL value Signed-off-by: Gabor Mezei --- library/bignum_mod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/bignum_mod.c b/library/bignum_mod.c index 30289aaf0..6ff1c4ecc 100644 --- a/library/bignum_mod.c +++ b/library/bignum_mod.c @@ -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 );