summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/decoding.c7
1 files 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);
}
}