From 2d637c4cbbd4d72dc923a8d26e6b96db570003f4 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Wed, 12 Oct 2022 09:27:44 -0400 Subject: [PATCH] Fix unchecked allocation in test_suite_ssl Signed-off-by: Andrzej Kurek --- tests/suites/test_suite_ssl.function | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index 464ae06c5..c5ded5a71 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -873,9 +873,9 @@ int mbedtls_endpoint_certificate_init( mbedtls_endpoint *ep, int pk_alg, } cert = &( ep->cert ); - cert->ca_cert = mbedtls_calloc( 1, sizeof(mbedtls_x509_crt) ); - cert->cert = mbedtls_calloc( 1, sizeof(mbedtls_x509_crt) ); - cert->pkey = mbedtls_calloc( 1, sizeof(mbedtls_pk_context) ); + ASSERT_ALLOC( cert->ca_cert, sizeof(mbedtls_x509_crt) ); + ASSERT_ALLOC( cert->cert, sizeof(mbedtls_x509_crt) ); + ASSERT_ALLOC( cert->pkey, sizeof(mbedtls_pk_context) ); mbedtls_x509_crt_init( cert->ca_cert ); mbedtls_x509_crt_init( cert->cert );