Add 'exit' label and variable initialization to relevant test suite functions

This commit is contained in:
Paul Bakker 2014-07-10 15:26:12 +02:00
parent 318d0fe844
commit bd51b262d1
31 changed files with 235 additions and 28 deletions

View file

@ -92,6 +92,7 @@ void dhm_do_dhm( int radix_P, char *input_P,
TEST_ASSERT( sec_srv_len != 0 );
TEST_ASSERT( memcmp( sec_srv, sec_cli, sec_srv_len ) == 0 );
exit:
dhm_free( &ctx_srv );
dhm_free( &ctx_cli );
}
@ -115,6 +116,7 @@ void dhm_file( char *filename, char *p, char *g, int len )
TEST_ASSERT( mpi_cmp_mpi( &ctx.P, &P ) == 0 );
TEST_ASSERT( mpi_cmp_mpi( &ctx.G, &G ) == 0 );
exit:
mpi_free( &P ); mpi_free( &G );
dhm_free( &ctx );
}