fix eager cleanup

This commit is contained in:
Lev Walkin 2017-08-11 02:32:42 -07:00
parent 1dc754c529
commit 91ca273296
1 changed files with 1 additions and 1 deletions

View File

@ -1221,7 +1221,7 @@ CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr,
if(present == old_present)
return 0;
if(old_present == 0) {
if(old_present != 0) {
assert(old_present <= td->elements_count);
ASN_STRUCT_FREE_CONTENTS_ONLY(*td, sptr);
memset(sptr, 0, specs->struct_size);