From 7ddb53c18dc4cdbf3c3dd73e324e2b33a11bce4b 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 606072af39..73f62c39a8 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -807,9 +807,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 );