From da7317ed00d52124036728f7cb9f2a33c6b76959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 10 Sep 2013 15:52:52 +0200 Subject: [PATCH] Use asn1_free_named_data_list() when relevant --- library/x509write.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/library/x509write.c b/library/x509write.c index f4f3c4dcc..643538885 100644 --- a/library/x509write.c +++ b/library/x509write.c @@ -56,14 +56,8 @@ static int x509write_string_to_names( asn1_named_data **head, char *name ) int in_tag = 1; asn1_named_data *cur; - // Clear existing chain if present - // - while( *head != NULL ) - { - cur = *head; - *head = cur->next; - polarssl_free( cur ); - } + /* Clear existing chain if present */ + asn1_free_named_data_list( head ); while( c <= end ) {