Add initialization for structures

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei 2022-09-28 15:45:59 +02:00
parent 92ca1bc481
commit 1b5800d069
No known key found for this signature in database
GPG Key ID: FEE76C0CF8C6267D

View File

@ -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 */