diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-03-14 15:27:21 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-03-14 15:27:21 +0100 |
commit | 0b1cce8661cbdbb17d2c53ea314d442567bc508d (patch) | |
tree | 9fba3228ccbc8d23abf5ac82887d55ef5ab2616c | |
parent | 8801de3d8074ae74fcdead5172631ac404f573d4 (diff) | |
download | libtasn1-0b1cce8661cbdbb17d2c53ea314d442567bc508d.tar.gz libtasn1-0b1cce8661cbdbb17d2c53ea314d442567bc508d.tar.bz2 libtasn1-0b1cce8661cbdbb17d2c53ea314d442567bc508d.zip |
corrected delete_unneeded_choice_fields().
-rw-r--r-- | lib/decoding.c | 7 |
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); } } |