Add 'exit' label and variable initialization to relevant test suite functions
diff --git a/tests/suites/test_suite_ccm.function b/tests/suites/test_suite_ccm.function
index 8521fba..d513a15 100644
--- a/tests/suites/test_suite_ccm.function
+++ b/tests/suites/test_suite_ccm.function
@@ -27,6 +27,7 @@
ret = ccm_init( &ctx, cipher_id, key, key_size );
TEST_ASSERT( ret == result );
+exit:
ccm_free( &ctx );
}
/* END_CASE */
@@ -64,6 +65,7 @@
else
TEST_ASSERT( decrypt_ret == res );
+exit:
ccm_free( &ctx );
}
/* END_CASE */
@@ -106,6 +108,7 @@
/* Check we didn't write past the end */
TEST_ASSERT( msg[result_len] == 0 && msg[result_len + 1] == 0 );
+exit:
ccm_free( &ctx );
}
/* END_CASE */
@@ -171,6 +174,7 @@
/* Check we didn't write past the end (where the original tag is) */
TEST_ASSERT( memcmp( msg + msg_len, tag, tag_len ) == 0 );
+exit:
ccm_free( &ctx );
}
/* END_CASE */