summaryrefslogtreecommitdiff
path: root/lib/decoding.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-03-14 15:27:21 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-03-14 15:27:21 +0100
commit0b1cce8661cbdbb17d2c53ea314d442567bc508d (patch)
tree9fba3228ccbc8d23abf5ac82887d55ef5ab2616c /lib/decoding.c
parent8801de3d8074ae74fcdead5172631ac404f573d4 (diff)
downloadlibtasn1-0b1cce8661cbdbb17d2c53ea314d442567bc508d.tar.gz
libtasn1-0b1cce8661cbdbb17d2c53ea314d442567bc508d.tar.bz2
libtasn1-0b1cce8661cbdbb17d2c53ea314d442567bc508d.zip
corrected delete_unneeded_choice_fields().
Diffstat (limited to 'lib/decoding.c')
-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);
}
}