From 0b1cce8661cbdbb17d2c53ea314d442567bc508d Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Fri, 14 Mar 2014 15:27:21 +0100 Subject: corrected delete_unneeded_choice_fields(). --- lib/decoding.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/decoding.c b/lib/decoding.c index 82f1c24..dee7a9f 100644 --- a/lib/decoding.c +++ b/lib/decoding.c @@ -813,9 +813,12 @@ _asn1_get_indefinite_length_string (const unsigned char *der, int *len) static void delete_unneeded_choice_fields(asn1_node p) { - if (p->right) + asn1_node p2; + + while (p->right) { - asn1_delete_structure (&p->right); + p2 = p->right; + asn1_delete_structure (&p2); } } -- cgit v1.2.3