Add 'exit' label and variable initialization to relevant test suite functions
diff --git a/tests/suites/test_suite_pkcs1_v21.function b/tests/suites/test_suite_pkcs1_v21.function
index e1dfc52..24b200e 100644
--- a/tests/suites/test_suite_pkcs1_v21.function
+++ b/tests/suites/test_suite_pkcs1_v21.function
@@ -46,6 +46,7 @@
TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 );
}
+exit:
rsa_free( &ctx );
}
/* END_CASE */
@@ -101,6 +102,7 @@
TEST_ASSERT( strncasecmp( (char *) output_str, result_hex_str, strlen( result_hex_str ) ) == 0 );
}
+exit:
mpi_free( &P1 ); mpi_free( &Q1 ); mpi_free( &H ); mpi_free( &G );
rsa_free( &ctx );
}
@@ -164,6 +166,7 @@
TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 );
}
+exit:
mpi_free( &P1 ); mpi_free( &Q1 ); mpi_free( &H ); mpi_free( &G );
rsa_free( &ctx );
}
@@ -201,6 +204,7 @@
TEST_ASSERT( rsa_pkcs1_verify( &ctx, NULL, NULL, RSA_PUBLIC, digest, 0, hash_result, result_str ) == result );
+exit:
rsa_free( &ctx );
}
/* END_CASE */
@@ -257,6 +261,7 @@
mgf_hash, salt_len,
result_str ) == result_full );
+exit:
rsa_free( &ctx );
}
/* END_CASE */