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

@ -33,6 +33,7 @@ void pk_parse_keyfile_rsa( char *key_file, char *password, int result )
TEST_ASSERT( rsa_check_privkey( rsa ) == 0 );
}
exit:
pk_free( &ctx );
}
/* END_CASE */
@ -57,6 +58,7 @@ void pk_parse_public_keyfile_rsa( char *key_file, int result )
TEST_ASSERT( rsa_check_pubkey( rsa ) == 0 );
}
exit:
pk_free( &ctx );
}
/* END_CASE */
@ -81,6 +83,7 @@ void pk_parse_public_keyfile_ec( char *key_file, int result )
TEST_ASSERT( ecp_check_pubkey( &eckey->grp, &eckey->Q ) == 0 );
}
exit:
pk_free( &ctx );
}
/* END_CASE */
@ -105,6 +108,7 @@ void pk_parse_keyfile_ec( char *key_file, char *password, int result )
TEST_ASSERT( ecp_check_privkey( &eckey->grp, &eckey->d ) == 0 );
}
exit:
pk_free( &ctx );
}
/* END_CASE */
@ -131,6 +135,7 @@ void pk_parse_key_rsa( char *key_data, char *result_str, int result )
TEST_ASSERT( 1 );
}
exit:
pk_free( &pk );
}
/* END_CASE */