From 39dbe23845537d49ab37436006433de88c27882c Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Mon, 3 Apr 2023 10:19:22 +0200 Subject: [PATCH] Release memory for subject alt name in test Signed-off-by: Przemek Stekiel --- tests/suites/test_suite_x509parse.function | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function index c7d341dd04..4d89410898 100644 --- a/tests/suites/test_suite_x509parse.function +++ b/tests/suites/test_suite_x509parse.function @@ -1506,7 +1506,7 @@ void x509_crt_parse_authoritykeyid(data_t *buf, int bufferCounter = 0; size_t issuerCounter = 0; unsigned int result = 0; - mbedtls_x509_subject_alternative_name san = { 0 }; + mbedtls_x509_subject_alternative_name san; mbedtls_x509_name *pname = NULL; mbedtls_x509_crt_init(&crt); @@ -1533,6 +1533,7 @@ void x509_crt_parse_authoritykeyid(data_t *buf, bufferCounter++; /* Skipping the slash */ pname = pname->next; } + mbedtls_x509_free_subject_alt_name(&san); TEST_ASSERT(result == 0); /* Serial test */