freeing properly

git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1277 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2007-02-23 19:30:10 +00:00
parent 206313dde8
commit a325c8b17d
1 changed files with 4 additions and 4 deletions

View File

@ -808,16 +808,16 @@ SET_OF_free(asn_TYPE_descriptor_t *td, void *ptr, int contents_only) {
asn_set_empty(list); /* Remove (list->array) */
if(!contents_only) {
FREEMEM(ptr);
}
specs = (asn_SET_OF_specifics_t *)td->specifics;
ctx = (asn_struct_ctx_t *)((char *)ptr + specs->ctx_offset);
if(ctx->ptr) {
ASN_STRUCT_FREE(*elm->type, ctx->ptr);
ctx->ptr = 0;
}
if(!contents_only) {
FREEMEM(ptr);
}
}
}