From 7ba003746816a9bfd3cd6fb57bcb7dd406006090 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Thu, 26 Jan 2023 18:03:27 +0100 Subject: [PATCH] test: improve error handling in x509_set_serial_check() Signed-off-by: Valerio Setti --- tests/suites/test_suite_x509write.function | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/suites/test_suite_x509write.function b/tests/suites/test_suite_x509write.function index 03ecdab46a8b..6fd73477ed42 100644 --- a/tests/suites/test_suite_x509write.function +++ b/tests/suites/test_suite_x509write.function @@ -439,6 +439,8 @@ void x509_set_serial_check() sizeof(invalid_serial)), 0); TEST_EQUAL(mbedtls_x509write_crt_set_serial(&ctx, &serial_mpi), MBEDTLS_ERR_X509_BAD_INPUT_DATA); + +exit: mbedtls_mpi_free(&serial_mpi); } /* END_CASE */