aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1parser/asn1p_class.c
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2006-03-16 05:11:14 +0000
committerLev Walkin <vlm@lionet.info>2006-03-16 05:11:14 +0000
commit57074f10d3e9b089582dde25e0d3ae33be913302 (patch)
treecb2cc80c970900ca50823ad228d77b396eec0d47 /libasn1parser/asn1p_class.c
parent9d542d223252ea642347330dcc1acd337e49c0e2 (diff)
more distinction
Diffstat (limited to 'libasn1parser/asn1p_class.c')
-rw-r--r--libasn1parser/asn1p_class.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libasn1parser/asn1p_class.c b/libasn1parser/asn1p_class.c
index 741d98e1..c9065f66 100644
--- a/libasn1parser/asn1p_class.c
+++ b/libasn1parser/asn1p_class.c
@@ -19,7 +19,9 @@ void
asn1p_wsyntx_chunk_free(asn1p_wsyntx_chunk_t *wc) {
if(wc) {
switch(wc->type) {
- case WC_LITERAL: free(wc->content.token); break;
+ case WC_LITERAL:
+ case WC_WHITESPACE:
+ free(wc->content.token); break;
case WC_REFERENCE: asn1p_ref_free(wc->content.ref); break;
case WC_OPTIONALGROUP:
asn1p_wsyntx_free(wc->content.syntax);
@@ -35,8 +37,10 @@ asn1p_wsyntx_chunk_clone(asn1p_wsyntx_chunk_t *wc) {
nc = asn1p_wsyntx_chunk_new();
if(nc) {
+ nc->type = wc->type;
switch(wc->type) {
case WC_LITERAL:
+ case WC_WHITESPACE:
nc->content.token = malloc(strlen(wc->content.token)+1);
strcpy(nc->content.token, wc->content.token);
break;