Commit 91ca2732 authored by Lev Walkin's avatar Lev Walkin

fix eager cleanup

parent 1dc754c5
...@@ -1221,7 +1221,7 @@ CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr, ...@@ -1221,7 +1221,7 @@ CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr,
if(present == old_present) if(present == old_present)
return 0; return 0;
if(old_present == 0) { if(old_present != 0) {
assert(old_present <= td->elements_count); assert(old_present <= td->elements_count);
ASN_STRUCT_FREE_CONTENTS_ONLY(*td, sptr); ASN_STRUCT_FREE_CONTENTS_ONLY(*td, sptr);
memset(sptr, 0, specs->struct_size); memset(sptr, 0, specs->struct_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment