From 88f136f98b14144e86212ec5ebc994d71ceaee67 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 20 Sep 2019 21:06:27 +0200 Subject: [PATCH] Fix free_named_data_list tests Fix copypasta in test data and fix a switcho in test code. --- tests/suites/test_suite_asn1parse.data | 4 ++-- tests/suites/test_suite_asn1parse.function | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/suites/test_suite_asn1parse.data b/tests/suites/test_suite_asn1parse.data index 83319e3e5..c5d9136b7 100644 --- a/tests/suites/test_suite_asn1parse.data +++ b/tests/suites/test_suite_asn1parse.data @@ -432,7 +432,7 @@ Free named data list (empty) free_named_data_list:0 Free named data list (1) -free_named_data_list:0 +free_named_data_list:1 Free named data list (2) -free_named_data_list:0 +free_named_data_list:2 diff --git a/tests/suites/test_suite_asn1parse.function b/tests/suites/test_suite_asn1parse.function index f5ecd5515..3bfb1c703 100644 --- a/tests/suites/test_suite_asn1parse.function +++ b/tests/suites/test_suite_asn1parse.function @@ -547,7 +547,7 @@ void free_named_data_list( int length ) { mbedtls_asn1_named_data *new = NULL; ASSERT_ALLOC( new, sizeof( mbedtls_asn1_named_data ) ); - head->next = new; + new->next = head; head = new; }