diff --git a/test/mem_alloc_test.c b/test/mem_alloc_test.c index 899f49d2d4..0f305d2744 100644 --- a/test/mem_alloc_test.c +++ b/test/mem_alloc_test.c @@ -698,7 +698,7 @@ static int test_xaligned_alloc(const bool array, const bool macro, #if !defined(OPENSSL_SMALL_FOOTPRINT) if (IS_FAIL(exp) && !TEST_ptr_null(freeptr)) res = 0; - if ((exp = EXP_NONNULL) && !TEST_ptr(freeptr)) + if ((exp == EXP_NONNULL) && !TEST_ptr(freeptr)) res = 0; #else /* OPENSSL_SMALL_FOOTPRINT */ if (!TEST_ptr_null(ret) || !TEST_ptr_null(freeptr))