Exporter tests: Fix possible uninitialized variable use
Signed-off-by: Max Fillinger <max@max-fillinger.net>
diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function
index 88fa71b..e0e1a43 100644
--- a/tests/suites/test_suite_ssl.function
+++ b/tests/suites/test_suite_ssl.function
@@ -5898,8 +5898,6 @@
void ssl_tls_exporter_rejects_bad_parameters(
int proto, int exported_key_length, int label_length, int context_length)
{
- MD_OR_USE_PSA_INIT();
-
int ret = -1;
uint8_t *key_buffer = NULL;
char *label = NULL;
@@ -5914,9 +5912,7 @@
TEST_CALLOC(label, label_length);
TEST_CALLOC(context, context_length);
- memset(key_buffer, 0, exported_key_length);
- memset(label, 0, label_length);
- memset(context, 0, context_length);
+ MD_OR_USE_PSA_INIT();
ret = mbedtls_test_ssl_do_handshake_with_endpoints(&server_ep, &client_ep, &options, proto);
TEST_ASSERT(ret == 0);