From 1b5800d069b804d085886fc7e78e84be601eda7d Mon Sep 17 00:00:00 2001 From: Gabor Mezei Date: Wed, 28 Sep 2022 15:45:59 +0200 Subject: [PATCH] Add initialization for structures Signed-off-by: Gabor Mezei --- tests/suites/test_suite_ecdsa.function | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/suites/test_suite_ecdsa.function b/tests/suites/test_suite_ecdsa.function index 549373a4f642..e5ae5dd5762f 100644 --- a/tests/suites/test_suite_ecdsa.function +++ b/tests/suites/test_suite_ecdsa.function @@ -20,6 +20,12 @@ void ecdsa_invalid_param( ) size_t slen; unsigned char buf[42] = { 0 }; + mbedtls_ecdsa_init( &ctx ); + mbedtls_ecp_keypair_init( &key ); + mbedtls_ecp_group_init( &grp ); + mbedtls_ecp_point_init( &P ); + mbedtls_mpi_init( &m ); + TEST_INVALID_PARAM( mbedtls_ecdsa_init( NULL ) ); TEST_VALID_PARAM( mbedtls_ecdsa_free( NULL ) ); @@ -200,6 +206,12 @@ void ecdsa_invalid_param( ) mbedtls_ecdsa_from_keypair( &ctx, NULL ) ); exit: + mbedtls_ecdsa_free( &ctx ); + mbedtls_ecp_keypair_free( &key ); + mbedtls_ecp_group_free( &grp ); + mbedtls_ecp_point_free( &P ); + mbedtls_mpi_free( &m ); + return; } /* END_CASE */